JBoss Community

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

created by seyvet in JBoss Transactions Development - View the full discussion

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

Start a new discussion in JBoss Transactions Development at Community