I have a stateless bean something like:
@Stateless
public class MyStatelessBean implements MyStatelessLocal, MyStatelessRemote {
@PersistenceContext(unit
Another way to do it is actually having both methods on the same bean - and having an @EJB
reference to itself! Something like that:
// supposing processObjects defined on MyStatelessRemote1 and process defined on MyStatelessLocal1
@Stateless
@TransationAttribute(TransactionAttributeType.NOT_SUPPORTED)
public class MyStatelessBean1 implements MyStatelessLocal1, MyStatelessRemote1 {
@EJB
private MyStatelessLocal1 myBean2;
public void processObjects(List
This way you actually 'force' the process()
method to be accessed via the ejb stack of proxies, therefore taking the @TransactionAttribute
in effect - and still keeping only one class. Phew!