1 Reply Latest reply on Nov 5, 2010 10:35 AM by jaikiran pai

    Imlementing local interface and another interface in session bean

    Arbi Sookazian Master

      Please consider the following scenario:

       

      {code}

      @Stateless
      public class FooServiceBean implements FooService, BarService {

         @TransactionAttribute(value=TransactionAttributeType.NOT_SUPPORTED)

         public void myMethod1() {

              //code here

         }

      }

       

      @Local

      public interface FooService {

      ...

      }

       

      public interface BarService {

          public void myMethod1();

      }

      {code}

       

      If we invoke myMethod1(), will the method run outside of a tx or not?  i.e. is the instance managed by the EJB container or not?  I'm seeing behavior that suggests otherwise in my current JBoss 4.2.x app.  It is actually running in a tx (in this case a distributed tx b/c there are multiple datasources that are being queried via multiple DAOs).  In effect, the NOT_SUPPORTED tx attribute is being ignored.  Please advise.  thx.