1 Reply Latest reply on Feb 25, 2005 1:06 PM by Adrian Brock

    Whether JTA tx.commit() or tx.rollback(), JBossMQ always suc

    Zhang Jingyu Newbie

      In JBoss4.0.1sp1, a servlet uses JTA to commit JMS transaction?
      (JBossMQ+JBossTx)

      public void doGet(..)
      {
      ......
      ctx = new InitialContext();
      userTran = (UserTransaction)ctx.lookup("UserTransaction");
      userTran.begin();
      //JMS Sender sends msg to JMS queue using XA
      userTran.rollback();
      userTran = null;
      ....
      }

      It seems everything goes well. But the result turns to be strange. Whether 'userTran.rollback()' or 'userTran.commit()'?msg is always put into queue(Receiver can get it from queue each time).

      Would anybody please give me a hand? Thanks a lot! :)