-
1. Re: how to get UserTransaction from a client
adrian.brock Mar 7, 2002 12:16 PM (in response to luckystar_007)Object o = new InitialContext().lookup("UserTransaction");
UserTransaction ut = (UserTransaction)PortableRemoteObject.narrow(o, UserTransaction.class);
Regards,
Adrian -
2. Re: how to get UserTransaction from a client
methodman Feb 7, 2003 9:14 AM (in response to luckystar_007)Excerpt From the AdminDevelopers Book 3.0.5:
The JTA javax.transaction.UserTransaction interface allows applications to explicitly control transac-tions.
For enterprise session beans that manage transaction themselves (BMT), a UserTransaction can
be obtained by calling the getUserTransaction method on the bean context object, javax.ejb.Session-Context.
Note: For BMT beans, do not obtain the UserTransaction interface using a JNDI
lookup. Doing this violates the EJB specification, and the returned UserTransaction
object does not have the hooks the EJB container needs to make important checks.