This content has been marked as final.
Show 1 reply
-
1. Re: UserTransaction and JNDI in JBoss 4
starksm64 Mar 15, 2005 9:11 AM (in response to vpascaru)There is a unit test which does this exact lookup:
// Get an initial context InitialContext ctx; try { ctx = new InitialContext(); } catch (NamingException ex) { throw new ServletException("Unable to get an InitialContext", ex); } // Get the UserTransaction UserTransaction ut; try { ut = (UserTransaction)ctx.lookup("java:comp/UserTransaction"); } catch (NamingException ex) { throw new ServletException("Unable to lookup UserTransaction", ex); }