If i have two methods inside an EJB bean, one with Transaction attribute of NOT_SUPPORTED that needs to call the other with REQUIRED, can i expect the transaction to kick in if i make the call through an injected bean:
@Stateless
@LocalBean
public class LeBean {
@EJB LeBean bean;
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public void someMethod(){
...
bean.otherMethod();
}
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public void otherMethd(){
...
}
}
or can i make the call locally like so:
@Stateless
@LocalBean
public class LeBean {
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public void someMethod(){
...
otherMethod();
}
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public void otherMethd(){
...
}
}
right now someMethod() takes a long time to process information before reaching otherMethod() and so the transaction times out, even though i have stated NOT_SUPPORTED as the transactionAttribute for the first method.