[jboss-dev-forums] [Design of JBoss Transaction Services] - Re: Error or RuntimeException in Synchronization.afterComple
adrian@jboss.org
do-not-reply at jboss.com
Wed Sep 3 04:28:12 EDT 2008
"wolfc" wrote : If I throw an AssertionError in afterCompletion from a Synchronization. I would expect the tx.commit() to throw an exception.
|
Why?
It's valid for the JTA implementation to do:
Psuedo code:
| commit()
| {
| resources.end();
| synchronizations.beforeCompletion();
| resources.prepare();
| log.writeResult(); // HERE we know/record the result of the commit (modulo heuristics)
| threadPool.submit(commitPhase);
| removeThreadAssociation();
| return;
| }
|
so the rollback()/commit()/afterCompletion()s could be executed
after the call to tm/tx.commit() has returned to you.
it would also be wrong to signal a transaction failure, if it actually committed
but one of the afterCompletions buggily threw an exception.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173874#4173874
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173874
More information about the jboss-dev-forums
mailing list