[jboss-dev-forums] [JBoss Transactions Development] - Re: EnityManager.close() before or after JTA afterCompletion()?

seyvet do-not-reply at jboss.com
Mon Feb 4 12:00:50 EST 2013


seyvet [https://community.jboss.org/people/seyvet] created the discussion

"Re: EnityManager.close() before or after JTA afterCompletion()?"

To view the discussion, visit: https://community.jboss.org/message/795986#795986

--------------------------------------------------------------
Thanks Tom,

Yes please! 

The question is about the following sequence where after the transaction is committed:
1) The container will first invoke the JPA persistence provider as indicated by this first callback:
> {code}
> at org.datanucleus.api.jpa.JPAEntityManager.close(JPAEntityManager.java:194)
> at org.jboss.as.jpa.transaction.TransactionUtil$SessionSynchronization.afterCompletion(TransactionUtil.java:193)
> at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
> at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)
> {code}

2) Which is then followed by a second callback (JTA related this time) from the container:
> {code}
> at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
>             at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)
>             at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:103)
>             at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
>             at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
>             at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
>             at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
> {code}

The questions:
- Is this order defined by JBoss?
- Can this order be modified?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/795986#795986]

Start a new discussion in JBoss Transactions Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2041]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20130204/036291d8/attachment.html 


More information about the jboss-dev-forums mailing list