Hi,
In my code I have multiple calls of CoreSession.createDocument() to create
different documents.
First call creates some parent document and other calls are creating children
of parent.
Sometimes execution of PostCommitEventListeners - AuditEventLogger or
NotificationEventListener is throwing an exception:
javax.transaction.HeuristicMixedException
at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1397)
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
at
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
at
org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:140)
at
org.nuxeo.ecm.core.event.tx.EventBundleTransactionHandler.commitOrRollbackTransaction(EventBundleTransactionHandler.java:189)
at
org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$Job.run(AsyncEventExecutor.java:110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
To prevent this I try to call after creation of parent
EventService.waitForAsyncCompletion() and everything works fine. But I'm not
sure is this works because of nap in the call.
Is this correct or I have to do something else to stop raising of such
exception?
Regards,
Stefan
--
Posted by "[email protected]" at Nuxeo Discussions
<http://nuxeo.org/discussions>
View the complete thread:
<http://www.nuxeo.org/discussions/thread.jspa?threadID=2906#8496>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm