Hello,

I'm having problem understanding some concepts or may be there's something weird going on in my code.

MySessionBean is a statless bean. foo() in it has a "Required" trans-attribute

MyEntityBean has a local interface. bar() in it has a "RequiresNew" trans-attribute (changing it to "Required" produces the same problems).

foo() calls bar(). ->

In bar(), I explicitly call EJBContext's setRollbackOnly(). ->

foo() gets javax.transaction.RollbackException.

My questions are:

a. I don't think doing a setRollbackOnly() should throw an exception according to EJB2.0 specs (see 18.3.6)

b. Even if it should throw it, why is it throwing javax.transaction.RollbackException and not javax.ejb.TransactionRolledbackLocal Exception ?

Thanks very much for any help.

 



Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup

Reply via email to