[jboss-user] [EJB 3.0] - Transaction question, REQUIRES_NEW

busawreck do-not-reply at jboss.com
Fri Oct 20 06:14:46 EDT 2006

I have a Stateless SB with a business method (m1) for completing a series of tasks all in their own transactions, so that if task xx fails the other tasks will still complete. For each task I call a business method (m2) on the same bean with the annotation TransactionAttribute(REQUIRES_NEW).
   I would expect that when I throw (and catch) a RuntimeException in m2, it would mark my current transaction for rollback, but the transaction in m1 would not be marked for rollback. When I run my program though, I notice that after the RuntimException has been thrown (and caught) in m2, the transaction in m1 is marked for rollback, hence all calls to m2 fails aswell. 
   Where am I doing/thinking wrong :).

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979610#3979610

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979610

More information about the jboss-user mailing list