Tom Jenkinson [
https://community.jboss.org/people/tomjenkinson] created the discussion
"Re: EnityManager.close() before or after JTA afterCompletion()?"
To view the discussion, visit:
https://community.jboss.org/message/795988#795988
--------------------------------------------------------------
Hi Seyvet,
If you look at those two stack traces you can see a common line:
at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)
The only ordering that can be guaranteed is for interposed synchronizations (registered by
the TransactionSynchronizationRegistry):
http://docs.oracle.com/javaee/5/api/javax/transaction/TransactionSynchron...
http://docs.oracle.com/javaee/5/api/javax/transaction/TransactionSynchron...
There was a little mistype in my original response which I will now refactor in the
original to say:
...
foreach ResourceManager
rm::commit()
foreach InterposedSynchronization
s::beforeCompletion();
foreach Synchronization
s::afterCompletion();
i.e. When it comes to afterCompletion, interposed synchronizations will be called *first*
which is one way (if you only have two synchronizations ;) ) to guarentee order.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/795988#795988]
Start a new discussion in JBoss Transactions Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]