Page 1 of 1

Re: About Question enthuware.oce-ejbd.v6.2.610 :

Posted: Sun Jan 15, 2012 11:29 pm
by goetz
In option 2, instead of
call ut.getStatus() != Status.STATUS_ROLLEDBACK at INSERT CODE HERE.
shouldn't it be:
call ut.getStatus() != Status.STATUS_MARKED_ROLLBACK at INSERT CODE HERE.
Because anotherMethod() merely marked the txn for rollback instead of actually rolling back the txn...

Re: About Question enthuware.oce-ejbd.v6.2.610 :

Posted: Mon Jan 16, 2012 8:47 am
by admin
I think STATUS_ROLLEDBACK is fine as well because the API for STATUS_ROLLEDBACK says,
A transaction is associated with the target object and the outcome has been determined to be rollback. It is likely that heuristics exist; otherwise, the transaction would have been destroyed and NoTransaction returned.

Re: About Question enthuware.oce-ejbd.v6.2.610 :

Posted: Mon Mar 05, 2012 2:14 pm
by Alan
First option is right:

if (!ut.getRollbackOnly()) {
// executes only if anotherMethod has NOT set the transaction for a rollback
}

Am I missing something?

Re: About Question enthuware.oce-ejbd.v6.2.610 :

Posted: Thu Mar 08, 2012 3:41 pm
by Alan
UT does not have such method :oops:

Re: About Question enthuware.oce-ejbd.v6.2.610 :

Posted: Sat May 12, 2012 11:37 am
by aminoss007
getRollbackOnly() method is reserved for container managed transaction, ejbContext.getRollBackOnly().

Re: About Question enthuware.oce-ejbd.v6.2.610 :

Posted: Sat Feb 16, 2013 11:28 am
by Nuno Agostinho
Just tried it with Glassfish and the status that it gets in this situation is Status.STATUS_MARKED_ROLLBACK.
And if the client only marks as rollback, then it can never be Status.STATUS_ROLLEDBACK at this point because no commit or rollback was attempted. The transaction is either active or marked for rollback.

Re: About Question enthuware.oce-ejbd.v6.2.610 :

Posted: Sun Mar 17, 2013 10:53 am
by admin
This has now been fixed.
Thank you for your feedback!