Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I know if an EJB is in transaction context?

843829Sep 24 2002 — edited May 13 2003
Hi all!
I'm getting the following error when I call ejbContext.getRollbackOnly():

[Exception: java.lang.IllegalStateException; Message: Illegal attempt to call EJBContext.getRollbackOnly() from an EJB that was not participating in a transaction.]

How can I verify if the EJB (CMT) is participating in a transaction before call getRollbackOnly or setRollbackOnly?

Thanks,
Denis Macedo
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 10 2003
Added on Sep 24 2002
14 comments
458 views