-
1. Re: EJB3 transaction propagation
zilbi Aug 13, 2008 5:18 PM (in response to rphadnis)not sure but i think what happens is the the call you make for update() are not recognized by the container as ejb calls and that's why a new transaction is not opend.
think you need to get a ref to this ejb using the session context and invoke update using it. should look something like thatYourLocalSession localRef = context.getBusinessObject( YourLocalSession.class ); for... { localRef .update(); } // end for
hope it helps,
zilbi -
2. Re: EJB3 transaction propagation
rphadnis Aug 14, 2008 3:30 PM (in response to rphadnis)So are the transaction related annotations on methods called from a bean method not applied ?
Also update(Record r) is marked as a private method and not defined in the bean interface. -
3. Re: EJB3 transaction propagation
jaikiran Aug 15, 2008 9:19 AM (in response to rphadnis)zilbi is right. A plain Java call will not start a new transaction. You have to invoke that method through the EJB object.
Also update(Record r) is marked as a private method and not defined in the bean interface.
You will have to make it accessible through the interface. -
4. Re: EJB3 transaction propagation
rphadnis Aug 22, 2008 4:53 PM (in response to rphadnis)Thank you for the reply. Is that documented somewhere ? It means that putting transaction attributes on methods that are called by the bean methods is not correct and probably should n't be allowed.