afterAfterTransaction is simply a part of the afterTransaction process.
afterTransaction is split into a number of steps, afterAfterTransaction
simply being the last step in that process.
On 07/18/2012 05:15 AM, Sanne Grinovero wrote:
Hi all,
I'm puzzled about the implementation we have in
org.hibernate.engine.transaction.internal.jta.JtaTransaction
regarding after-transaction completion handling.
Looking at the two methods:
afterAfterCompletion(); <-- note the "After - After" prefix
afterTransactionCompletion(int status);
The implementation of afterTransactionCompletion(int status) is a
no-op, while after-after-completion actually invokes the
transactionCoordinator().afterTransaction( this,
userTransaction.getStatus() );
Shouldn't this be invoked in the afterTransactionCompletion(status) method?
As I just noticed in some OGM tests, during the after-after phase it's
too late to invoke the getStatus() on the transaction as this will
have been cleaned up already: that's why the
afterTransactionCompletion(int) has a status parameter, as the status
argument should be used rather than attempting to lookup the
transaction state again.
OGM is having it's own AbstractTransactionImpl implementation;
changing it by moving the afterTransaction call in the appropriate
method fixed my problems to our Search integration.
This looks like a change that should be picked up by ORM's
JtaTransaction too? I'm not familiar with this, so I might be totally
wrong but in case I would love to understand why.
Cheers,
Sanne
_______________________________________________
hibernate-dev mailing list
hibernate-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev
--
steve(a)hibernate.org
http://hibernate.org