Atomikos Forum |
|
I am using Atomikos TransactionsEssentials for two phase commit.
Resources involved are IBM MQ and Sybase.(15.5) I am using Spring AOP for transaction management and using TransactionsEssentials. I am sending a message to MQ and then trying to save data in DB, I am getting following exception. Does this mean MQ has marked the transaction as rolled back? I checked following flag and its value is 0 which is same in case of successful save. transactionManager.getTransactionManager().getTransaction().getStatus() Is there any other flag I can check if its marked as rollback only? Is there setting in Atomikos through which I tell Atomikos that if any previous resource marked transaction as rolled back do not call successive calls. Stack Trace: org.springframework.jdbc.UncategorizedSQLException: ### Error querying database. Cause: com.sybase.jdbc3.jdbc.SybSQLException: Cannot execute the command 'INSERT' (spid '1033') because the external transaction has been rolled back. ### The error may exist in mybatis/investments/sqlmap/xxxx.xml ### The error may involve xxxx ### The error occurred while setting parameters ### SQL: { call sp_name ( ?, ?, ?, ?, ?, ?, ? ) } ### Cause: com.sybase.jdbc3.jdbc.SybSQLException: Cannot execute the command 'INSERT' (spid '1033') because the external transaction has been rolled back. ; uncategorized SQLException for SQL []; SQL state [ZZZZZ]; error code [3953]; Cannot execute the command 'INSERT' (spid '1033') because the external transaction has been rolled back. ; nested exception is com.sybase.jdbc3.jdbc.SybSQLException: Cannot execute the command 'INSERT' (spid '1033') because the external transaction has been rolled back. at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365) at $Proxy60.selectOne(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160) |