Atomikos Forum |
|
Hi,
My usecase scenario; pick a message from q1 persist to mysql db - db_a ( Mysql db) send a message to q2 ( Note : q1, q2 are in the same Websphere MQserver) persist to mysql db - db_b (Mysql db) Everything works fine the way it is expected to be. Also during initilization of the server i dont see any error messages in the log. But, my first message (after the server initialized ) results in error/warning and it goes through plus everything works ok thereafter (no error for messages thereafter). Is this ok. Note: I am using the most flexible approach..initializing userTransactionService as per the atomikos document. com.atomikos.icatch.config.UserTransactionService uts = new com.atomikos.icatch.config.UserTransactionServiceImp(); Here are the message from transaction log: ********** 09-08-31 15:19:33,692 [Thread-48] MAP_MQ_XA_RMI: refreshed XAResource 09-08-31 15:20:53,617 [Thread-48] MAP_MQ_XA_RMI: refreshed XAResource 09-08-31 15:20:53,898 [Thread-48] DataSource1: refreshed XAResource 09-08-31 15:20:53,898 [Thread-48] Coordinator not recoverable: ${system.environment}0000200001 09-08-31 15:20:54,085 [Thread-48] MAP_MQ_XA_RMI: refreshed XAResource 09-08-31 15:20:54,117 [Thread-48] DataSource2: refreshed XAResource 09-08-31 15:20:54,117 [Thread-48] Coordinator not recoverable: ${system.environment}0000200001 09-08-31 15:20:54,320 [Atomikos:6] XA resource 'DataSource1': rollback for XID '247B73797374656D2E656E7669726F6E6D656E747D30303030323030303031:247B73797374656D2E656E7669726F6E6D656E747D33' raised -4: the supplied XID is invalid for this XA resource com.mysql.jdbc.jdbc2.optional.MysqlXAException: XAER_NOTA: Unknown XID at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.mapXAExceptionFromSQLException(MysqlXAConnection.java:562) at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(MysqlXAConnection.java:545) at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.rollback(MysqlXAConnection.java:390) at com.atomikos.datasource.xa.XAResourceTransaction.rollback(XAResourceTransaction.java:656) at com.atomikos.icatch.imp.RollbackMessage.send(RollbackMessage.java:75) at com.atomikos.icatch.imp.PropagationMessage.submit(PropagationMessage.java:114) at com.atomikos.icatch.imp.Propagator$PropagatorThread.run(Propagator.java:90) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) 09-08-31 15:20:54,351 [Thread-48] XA resource 'DataSource1': resume for XID '247B73797374656D2E656E7669726F6E6D656E747D30303030333030303031:247B73797374656D2E656E7669726F6E6D656E747D37' raised -7: the XA resource has become unavailable com.mysql.jdbc.jdbc2.optional.MysqlXAException: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.mapXAExceptionFromSQLException(MysqlXAConnection.java:562) at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(MysqlXAConnection.java:545) at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.start(MysqlXAConnection.java:485) at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:435) at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.<init>(BranchEnlistedStateHandler.java:60) at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.java:60) at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:88) at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:179) at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:197) at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:132) at $Proxy7.prepareStatement(Unknown Source) at mo.persistence.statement.SqlStatement.createStatement(SqlStatement.java:200) at mo.persistence.Query.getStatement(Query.java:211) at mo.persistence.DBDAO.persist(DBDAO.java:875) at mo.persistence.DefaultPersistenceService.auditAndPersist_aroundBody4(DefaultPersistenceService.java:504) at mo.persistence.DefaultPersistenceService.auditAndPersist_aroundBody5$advice(DefaultPersistenceService.java:94) at mo.persistence.DefaultPersistenceService.auditAndPersist(DefaultPersistenceService.java:1) at mo.persistence.DefaultPersistenceService.persist(DefaultPersistenceService.java:493) at mo.persistence.DefaultPersistenceService.persist(DefaultPersistenceService.java:474) at mo.persistence.DefaultPersistenceService.persist(DefaultPersistenceService.java:455) at net.dds.mq.securityexit.MQMessageHandler.handle(MQMessageHandler.java:33) at mo.controller.RunHandler.execute(RunHandler.java:83) at mo.controller.Executable.run(Executable.java:31) at mo.controller.Flow.execute(Flow.java:107) at mo.controller.Executable.run(Executable.java:31) at mo.controller.ControllerImpl.run(ControllerImpl.java:112) at mo.controller.ControllerImpl.service(ControllerImpl.java:73) at mo.messaging.AbstractMessageReceiver.processMessage(AbstractMessageReceiver.java:143) at mo.messaging.jms.xa.AtomikosJMSReceiver.onMessage(AtomikosJMSReceiver.java:166) at com.atomikos.jms.extra.MessageConsumerSession$ReceiverThread.run(MessageConsumerSession.java:509) 09-08-31 15:20:54,367 [Thread-48] Error enlisting in transaction - connection might be broken? Please check the logs for more information... com.atomikos.datasource.ResourceException: XA resource 'DataSource1': resume for XID '247B73797374656D2E656E7669726F6E6D656E747D30303030333030303031:247B73797374656D2E656E7669726F6E6D656E747D37' raised -7: the XA resource has become unavailable at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:445) at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.<init>(BranchEnlistedStateHandler.java:60) at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.java:60) at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:88) at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:179) at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:197) at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:132) at $Proxy7.prepareStatement(Unknown Source) at mo.persistence.statement.SqlStatement.createStatement(SqlStatement.java:200) at mo.persistence.Query.getStatement(Query.java:211) at mo.persistence.DBDAO.persist(DBDAO.java:875) at mo.persistence.DefaultPersistenceService.auditAndPersist_aroundBody4(DefaultPersistenceService.java:504) at mo.persistence.DefaultPersistenceService.auditAndPersist_aroundBody5$advice(DefaultPersistenceService.java:94) at mo.persistence.DefaultPersistenceService.auditAndPersist(DefaultPersistenceService.java:1) at mo.persistence.DefaultPersistenceService.persist(DefaultPersistenceService.java:493) at mo.persistence.DefaultPersistenceService.persist(DefaultPersistenceService.java:474) at mo.persistence.DefaultPersistenceService.persist(DefaultPersistenceService.java:455) at net.dds.mq.securityexit.MQMessageHandler.handle(MQMessageHandler.java:33) at mo.controller.RunHandler.execute(RunHandler.java:83) at mo.controller.Executable.run(Executable.java:31) at mo.controller.Flow.execute(Flow.java:107) at mo.controller.Executable.run(Executable.java:31) at mo.controller.ControllerImpl.run(ControllerImpl.java:112) at mo.controller.ControllerImpl.service(ControllerImpl.java:73) at mo.messaging.AbstractMessageReceiver.processMessage(AbstractMessageReceiver.java:143) at mo.messaging.jms.xa.AtomikosJMSReceiver.onMessage(AtomikosJMSReceiver.java:166) at com.atomikos.jms.extra.MessageConsumerSession$ReceiverThread.run(MessageConsumerSession.java:509) 09-08-31 15:20:54,429 [Thread-48] an AtomikosXAPooledConnection with a SessionHandleState with 0 context(s): connection is erroneous 09-08-31 15:20:54,429 [Thread-48] atomikos connection pool 'DataSource1': error creating proxy of connection an AtomikosXAPooledConnection with a SessionHandleState with 0 context(s) com.atomikos.jdbc.AtomikosSQLException: an AtomikosXAPooledConnection with a SessionHandleState with 0 context(s): connection is erroneous at com.atomikos.jdbc.AtomikosSQLException.throwAtomikosSQLException(AtomikosSQLException.java:47) at com.atomikos.jdbc.AtomikosSQLException.throwAtomikosSQLException(AtomikosSQLException.java:58) at com.atomikos.jdbc.AtomikosXAPooledConnection.testUnderlyingConnection(AtomikosXAPooledConnection.java:112) at com.atomikos.datasource.pool.AbstractXPooledConnection.createConnectionProxy(AbstractXPooledConnection.java:71) at com.atomikos.datasource.pool.ConnectionPool.borrowConnection(ConnectionPool.java:161) at com.atomikos.jdbc.AbstractDataSourceBean.getConnection(AbstractDataSourceBean.java:313) at com.atomikos.jdbc.AbstractDataSourceBean.getConnection(AbstractDataSourceBean.java:365) at mo.persistence.atomikos.AtomikosConnectionService.getConnection(AtomikosConnectionService.java:55) at mo.persistence.atomikos.AtomikosConnectionService.getConnection(AtomikosConnectionService.java:62) at mo.persistence.Query.setDatasource(Query.java:127) at mo.persistence.Query.<init>(Query.java:92) at mo.persistence.DefaultPersistenceService.getQuery(DefaultPersistenceService.java:1009) at mo.persistence.DefaultPersistenceService.auditAndPersist_aroundBody4(DefaultPersistenceService.java:501) at mo.persistence.DefaultPersistenceService.auditAndPersist_aroundBody5$advice(DefaultPersistenceService.java:94) at mo.persistence.DefaultPersistenceService.auditAndPersist(DefaultPersistenceService.java:1) at mo.persistence.DefaultPersistenceService.persist(DefaultPersistenceService.java:493) at mo.persistence.DefaultPersistenceService.persist(DefaultPersistenceService.java:474) at mo.persistence.DefaultPersistenceService.persist(DefaultPersistenceService.java:455) at net.dds.mq.securityexit.MQMessageHandler.handle(MQMessageHandler.java:33) at mo.controller.RunHandler.execute(RunHandler.java:83) at mo.controller.Executable.run(Executable.java:31) at mo.controller.Flow.execute(Flow.java:107) at mo.controller.Executable.run(Executable.java:31) at mo.controller.ControllerImpl.run(ControllerImpl.java:112) at mo.controller.ControllerImpl.service(ControllerImpl.java:73) at mo.messaging.AbstractMessageReceiver.processMessage(AbstractMessageReceiver.java:143) at mo.messaging.jms.xa.AtomikosJMSReceiver.onMessage(AtomikosJMSReceiver.java:166) at com.atomikos.jms.extra.MessageConsumerSession$ReceiverThread.run(MessageConsumerSession.java:509) ************** Here are the messages: |