Thursday, November 29, 2012

Cannot call Connection.rollback in distributed transaction. Transaction Manager will commit the resource manager when the distributed transaction is committed

If we take care the configuration details for the data source and connection pool, often transaction roll back exceptions can be avoided

For e.g the below error happened due to the incorrect configuration of d atasource

Internal Exception: java.sql.SQLException: Cannot call Connection.rollback in distributed transaction.  Transaction Manager will commit the resource manager when the distributed transaction is committed

In such situations verify the connection pool and check the type of datasource whether it is XA or non-XA.

If a non-XA data source is used in the connection pool, ensure you unchecked the 'Supports Global Transactions' option in the data source configuration





5 comments: