Skip to main content

Problem handling exception in LocalTransaction.commit()

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2012-06-15


We try to write a JCA adapter that should support local transactions.
We would like to use last agent optimization to put our connector in the same transaction with an XADataSource.
According to the spec, LocalTransactions.commit should throw LocalTransactionException to indicate an error during commit, and it should result in rollbacking the XA transaction.
However, this does not happen. We just see some stack traces in server.log, and the transaction remains in prepared state (and hangs there).
We debugged the call, and glassfish really executes last agent optimization, but ConnectorXAResource.commit (which calls it), translates the LocalTransactionException into an exception that doesn't result in rollback.

Is this a bug, or do we do something wrong?