Object o = new InitialContext().lookup("UserTransaction");
UserTransaction ut = (UserTransaction)PortableRemoteObject.narrow(o, UserTransaction.class);
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.