2 Replies Latest reply on Feb 12, 2015 2:59 AM by valsaraj viswanathan

    UserTransaction used by remote clients in WildFly

    valsaraj viswanathan Master

      Is it possible to lookup and use UserTransaction from a remote-client as in AS 4?

      I followed this document and connected from outside the server: Remote EJB invocations via JNDI - EJB client API or remote-naming project - WildFly 8 - Project Documentation Editor.


      Here is the code that I used in AS 4, which failed in WildFly


      Eg:

      public void beginTransaction() {

              try {

                  ut = (UserTransaction) getCtx().lookup("UserTransaction");

                  ut.begin();

              } catch (Exception ex) {

                  throw new RuntimeException("Failed to begin UserTransactiion", ex);

              }

          }

       

      Then I got this error:

      Caused by: javax.naming.NameNotFoundException: UserTransaction -- service jboss.naming.context.java.jboss.exported.UserTransaction