JBoss Community

Imlementing local interface and another interface in session bean

created by Arbi Sookazian in EJB3 - View the full discussion

Please consider the following scenario:

 

@Statelesspublic 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();
}

 

 

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.

Reply to this message by going to Community

Start a new discussion in EJB3 at Community