users@glassfish.java.net

Transaction

From: <glassfish_at_javadesktop.org>
Date: Wed, 26 Nov 2008 12:28:34 PST

Hello,

what happens in method m2 when m1 is called from a client.
m1 makes a local call to m2 (m2 requires a new transaction.)

Does m2 run in a new transaction or does the REQUIRES_NEW
only apply if the method is called over the business interface.

Thanks for your comment.

Joerg

@Stateless
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class ManagerBean implements Manager
{
      public m1()
      {
            this.m2();
      }

     @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
     public m2()
     {
         ....
     }
}
[Message sent by forum member 'hettel' (hettel)]

http://forums.java.net/jive/thread.jspa?messageID=318885