Atomikos Forum |
|
I am trying to integrate Atomikos TransactionsEssentials 3.8.0 in OFBiz (http://ofbiz.apache.org); basic read/write operations work fine (I am using the in memory Derby Db) but when I try to perform more complex commits the system hangs for a while until I get a transaction timeout error; here is a relevant part of the thread dump:
"http-bio-0.0.0.0-8443-exec-12" daemon prio=5 tid=7f7fed9bb800 nid=0x11d667000 waiting on condition [11d664000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at com.atomikos.icatch.imp.Propagator$PropagatorThread.run(Propagator.java:90) at com.atomikos.icatch.imp.Propagator.submitPropagationMessage(Propagator.java:66) - locked <7c1b40db0> (a com.atomikos.icatch.imp.Propagator) at com.atomikos.icatch.imp.CoordinatorStateHandler.rollback(CoordinatorStateHandler.java:699) at com.atomikos.icatch.imp.ActiveStateHandler.prepare(ActiveStateHandler.java:185) at com.atomikos.icatch.imp.CoordinatorImp.prepare(CoordinatorImp.java:688) - locked <7c1b40f50> (a com.atomikos.finitestates.FSMImp) at com.atomikos.icatch.imp.CoordinatorImp.terminate(CoordinatorImp.java:972) - locked <7c1b40f50> (a com.atomikos.finitestates.FSMImp) at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:82) at com.atomikos.icatch.imp.CompositeTransactionImp.commit(CompositeTransactionImp.java:336) at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:208) at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:501) at com.atomikos.icatch.jta.UserTransactionManager.commit(UserTransactionManager.java:177) ... I suspect that this is the process that is not completing... any hints of what may be the cause of this? Thanks Jacopo
Here are some debug messages from the thread:
2012-06-08 06:58:07,359 (http-bio-0.0.0.0-8443-exec-12) [ Slf4jLogger.java:20 :DEBUG] Propagator: retrying message: RollbackMessage to XAResourceTransaction: 61746F6D696B6F7330303830353030303032:61746F6D696B6F73373536 2012-06-08 06:58:07,360 (http-bio-0.0.0.0-8443-exec-12) [ Slf4jLogger.java:16 :INFO ] XAResource.end ( 61746F6D696B6F7330303830353030303032:61746F6D696B6F73373536 , XAResource.TMSUCCESS ) on resource Thread[Thread-41,5,main] represented by XAResource instance Thread[GenericXaResource-Thread,5,main] 2012-06-08 06:58:07,360 (http-bio-0.0.0.0-8443-exec-12) [ Slf4jLogger.java:33 :DEBUG] XA resource 'Thread[Thread-41,5,main]': end for XID '61746F6D696B6F7330303830353030303032:61746F6D696B6F73373536' raised -6: the XA resource did not expect this command in the current context javax.transaction.xa.XAException at org.ofbiz.entity.transaction.GenericXaResource.end(GenericXaResource.java:109) at com.atomikos.datasource.xa.XAResourceTransaction.suspend(XAResourceTransaction.java:461) at com.atomikos.datasource.xa.XAResourceTransaction.rollback(XAResourceTransaction.java:692) at com.atomikos.icatch.imp.RollbackMessage.send(RollbackMessage.java:70) at com.atomikos.icatch.imp.PropagationMessage.submit(PropagationMessage.java:109) at com.atomikos.icatch.imp.Propagator$PropagatorThread.run(Propagator.java:87) at com.atomikos.icatch.imp.Propagator.submitPropagationMessage(Propagator.java:66) at com.atomikos.icatch.imp.CoordinatorStateHandler.rollback(CoordinatorStateHandler.java:699) at com.atomikos.icatch.imp.ActiveStateHandler.prepare(ActiveStateHandler.java:185) at com.atomikos.icatch.imp.CoordinatorImp.prepare(CoordinatorImp.java:688) at com.atomikos.icatch.imp.CoordinatorImp.terminate(CoordinatorImp.java:972) at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:82) at com.atomikos.icatch.imp.CompositeTransactionImp.commit(CompositeTransactionImp.java:336) at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:208) at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:501) at com.atomikos.icatch.jta.UserTransactionManager.commit(UserTransactionManager.java:177) ... I can't understand much about them but it seems (and here I may be completely wrong) that the problem is that the Propagator is failing to send the RollbackMessage to the XAResourceTransaction because the transaction has been completed successfully... From the stack above it seems strange to me that a call to: at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:82) ends up calling: at com.atomikos.icatch.imp.CoordinatorStateHandler.rollback(CoordinatorStateHandler.java:699) Jacopo |