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
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
Thanks for this, I really like.
ReplyDeletehelpful. thanks
ReplyDeleteNice, helpful and it worked
ReplyDeleteI am using XA datasource , then what needs to be done?
ReplyDeleteGracias nos salvaste
ReplyDelete