Hi All,
I know that, in case of CMT, a transaction marked as rollBackOnly will rollback instead of commit.
I the case of BMT, I can't find the expected behaviour in the specs.
For me, a code like this
will throws an exception because you can't do a commit in a Transaction marked for rollback.
I read in the Javadoc of javax/transaction/UserTransaction.html#commit():
RollbackException - Thrown to indicate that the transaction has been rolled back rather than committed.
I tested it in my
JBoss and I get:
Exception in
thread "main" javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
Thanks in advance for your opinion,
Beno�t
[ February 26, 2008: Message edited by: Beno�t de CHATEAUVIEUX ]