messaginghub / pooled-jms

A JMS Connection pool for messaging applications supporting JMS 1.1 and 2.0 and Jakarta JMS clients
Apache License 2.0
50 stars 24 forks source link

session-leak, after error when registering tx-synchronization #35

Closed apinske closed 9 months ago

apinske commented 9 months ago

When an error occurs during the registering of the tx-sync in PooledXAConnection.createSession, the session is not put back in the pool and leaks.

Caused by: javax.transaction.RollbackException: ARJUNA016083: Cannot register synchronization because the transaction is in aborted state at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.registerSynchronizationImple(TransactionImple.java:395) at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.registerSynchronization(TransactionImple.java:376) at org.messaginghub.pooled.jms.pool.PooledXAConnection.createSession(PooledXAConnection.java:70)

Find a small sample project: https://github.com/apinske/playground-mq/tree/narayana-leak

tabish121 commented 9 months ago

Fixed as part of #32

apinske commented 9 months ago

Will there be a 1.2.7 release with this fix?

tabish121 commented 9 months ago

I don't currently have plans to release any more 1.x series versions as you can use 2.x with clients still on the javax.jms versions of JMS clients

tabish121 commented 8 months ago

I've released v1.2.7 with this fix merged in