0 Replies Latest reply on Sep 15, 2004 10:03 AM by nikhilnkatre

    code for using JMS through JTA

    nikhilnkatre

      I am trying to access the JMS as part of a user transaction. I tried writing the obvious code which is basically :-

      1) txn = (UserTransaction)Utils.lookup("UserTransaction");
      2) String queueConnFactoryName = "java:/XAConnectionFactory";
      3) Get queueConnection, queueSession.
      4) Get reciever from the queueSession, and recieve messages.
      5) txn.commit(); // commit the user transaction.


      However this does not work, the transaction is not comitted. I got hold of some code which uses XAResource and XidFactory directly and does work. However do I need to do all that ?

      Can someone help me. This question is a bit hurried, sorry about that.