4 Replies Latest reply on Mar 14, 2005 2:10 PM by Peris Brodsky

    UserTransaction and non-default JNDI context.

    Zac Jacobson Newbie

      I have a webapp that running in Tomcat that accesses my EJBs that live in a separately-running jBoss. Tomcat has a lot of other webapps that use the default (tomcat's) JNDI service, so I have to use

      Context ctx = new InitialContext(jBossJndiProperties);

      to access my EJBs. This works fine except for the UserTransaction. When I call begin() on my Transaction, I get
      javax.transaction.SystemException: java.lang.RuntimeException: UT factory lookup failed: javax.naming.NameNotFoundException: Name UserTransactionSessionFactory is not bound in this Context

      I searched around on the web, and it would seem that the org.jboss.tm.usertx.client.ClientUserTransaction builds its own JNDI Context using the default InitialContext constructor.

      Is there a workaround that would somehow let pass in a Context, or provide some other mechanism to allow the ClientUserTransaction to use my non-default JNDI Context?

      I'm using jBoss 2.4.10, is the functionality I need provided in more recent versions?