2 Replies Latest reply on May 9, 2007 5:42 PM by ivanneto

    XTS UserTransaction for clients running outside the server V

    ivanneto

      Does JBossTS XTS have a UserTransaction implementation that can be used by application clients that run outside the application server VM (an ordinary Java application, for example)?

      I created a XTS stand-alone coordinator and would like to use this coordinator from a simple Java application that runs in its own VM. I was taking a look at:

      com.arjuna.mwlabs.wst.at.remote.UserTransactionImple

      And it seemed to me that this class is an implementation of UserTransaction that can "talk" (via SOAP) with the stand-alone coordinator. This class needs to know where the WS-Coordinator ActivationCoordinator is, so I tell it where the coordinator is:

      System.setProperty(Environment.COORDINATOR_URL, "http://192.168.1.6:8080/xts/soap/ActivationCoordinator");
      UserTransactionImple userTx = new UserTransactionImple();
      userTx.begin();
      ...
      userTx.commit();


      Doing this, I get a NullPointerException:

      com.arjuna.wst.SystemException: java.lang.NullPointerException
       at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.startTransaction(UserTransactionImple.java:236)
       at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.begin(UserTransactionImple.java:105)
       at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.begin(UserTransactionImple.java:95)


      So, my question is: is there a way to demarcate transactions on stand-alone application clients? Or the only way to do this is on server-side components (via the UserTransactionImple returned by the UserTransactionFactory)?