Hi David, all, I have the following situation using txmanager (2.1.3) as a standalone component in my application.
ConnectionFactory.getConnection -> GenericConnectionManager.allocateConnection -> TransactionEnlistingInterceptor.getConnection -> TransactionImpl.enlistResource -> xaRes.start In my XAResource for internal reasons there's a failure to do the start (no network resources available), and it throws XAException XAER_RMERR. So enlistResource catches this and returns false. But the caller, TransactionEnlistingInterceptor.getConnection, does nothing with the return code and assumes all went well. So the corrupted XAResource stays in the pool and is still corrupted on the next try. In my opinion it should return the connection to the pool with a DESTROY action. There's a code path catching SystemException where it does it, but this exception is never raised here. I see two possible fixes: 1. make TransactionImpl.enlistResource throw SystemException at least when getting XAER_RMERR, 2. make TransactionEnlistingInterceptor.getConnection look for a false return value when calling enlistResource and in this case doing a DESTROY as well. What do you think? I can provide a JIRA ticket and a patch if needed. Florent -- Florent Guillaume, Director of R&D, Nuxeo Open Source, Java EE based, Enterprise Content Management (ECM) http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87
