Atomikos Forum |
|
When the transaction manager initializes, it attempts a recovery of all XA resources.
The rough execution stack is as follows: In the TransactionServiceImp.java, init() is called from spring initialization. In this init() method, line 665, recover () is called. In this recover () method, line 558, res.endRecovery() is called; vvvvv In the XATransactionResource.java, endRecovery() is called. In this endRecovery() method, performPresumedAbortForRemainingXids() is called. In this performPresumedAbortForRemainingXids() method line 595: XAResource xaresource = getXAResource() This will call refreshXAConnection().... This opens a new connection because it was previously null. This connection is passed down to the XAResource when recover() is call. I'm using the Oracle XA Driver and it properly cleans up and closes its recovery statements. However, Atomikos never closes the connection created with this getXAResource() call, thus leaving a session open with Oracle indefinitely. |