This content has been marked as final.
Show 1 reply
-
1. Re: TransactionAttribute,jpa,in as 7
lafr Sep 20, 2012 2:35 AM (in response to sh1theng)It does not, because calling it this way is a simple Java method call, not the call of the EJB business method.
Introduce another instance of the bean in itself and use this to call business method B.
@TransactionManagement(TransactionManagementType.CONTAINER)
public class BatchService implements BatchServiceRemote,BatchServiceLocal {
@EJB BatchServiceLocal service2;
@TransactionAttribute(TransactionAttributeType.NEVER)
method A(){
service2.B();
}
@TransactionAttribute(TransactionAttributeType.MANDATORY)
method B(){
}
...
}