0 Replies Latest reply on Apr 10, 2003 11:31 AM by trugbild

    Transactions...

    trugbild Newbie

      I got messed up with those programmatic transactions...
      I try to start transaction from within a Client-Application.
      So I get the UserTransaction-Object from the JBoss-Server (running on the same machine):
      userTran = (javax.transaction.UserTransaction)ctx.lookup("java:comp/UserTransaction");

      It seems to work. When I print out the object, I get: "com.sun.enterprise.distributedtx.UserTransactionImpl@2a4983"

      Then, I try to invoke begin():
      userTran.begin()
      and get the following exception:

      java.lang.NullPointerException
      at com.sun.jts.jta.TransactionManagerImpl.(init)(TransactionManagerImpl.java:116)
      at com.sun.jts.jta.TransactionManagerImpl.getTransactionManagerImpl(TransactionManagerImpl.java:105)
      at com.sun.jts.jta.UserTransactionImpl.init(UserTransactionImpl.java:173)
      at com.sun.jts.jta.UserTransactionImpl.begin(UserTransactionImpl.java:49)
      at com.sun.enterprise.distributedtx.UserTransactionImpl.begin(UserTransactionImpl.java:82)
      at Client.main(Client.java:45)

      (Client is the name of my TestClient-Application)

      So... it seems not to work it that way. Is there anything special I have to care about?
      I'm really new to this transaction-stuff and do not know, if I've forgotten somethin.