0 Replies Latest reply on Dec 16, 2002 3:50 PM by mlce

    MDB throws "Invalid transaction id" on JBoss3.2Beta2, works

    mlce

      I have a session bean that send a JMS-message to a MDB. The MDB sends itself another JMS-message.

      Both the session bean and the MDB runs under CMT with Required as trans-attribute.

      I want the JMS-send operations to be coordinated by the CMT transactions and have therefore the following code snippets in both the session bean and the MDB:

      QueueConnectionFactory factory =
      (QueueConnectionFactory)ctx.lookup("java:/JmsXA");
      QueueConnection con = factory.createQueueConnection();
      QueueSession session = con.createQueueSession(true, 0);

      This works fine on JBoss v3.0.4 but the MDB fails under JBoss3.2Beta2 (while the session bean works fine...)
      The MDB throws a "Invalid transaction id" - exception during the send-operation.

      If I (just for test purposes) run the JMS-send-operation in the MDB under a local-JMS-transaction it works as expected (as long as the MDB transaction commits...). Code snippet for local-JMS-transaction:

      QueueConnectionFactory factory =
      (QueueConnectionFactory)ctx.lookup
      ("ConnectionFactory");
      QueueConnection con = factory.createQueueConnection();
      QueueSession session = con.createQueueSession(
      false, QueueSession.AUTO_ACKNOWLEDGE);

      I can supply the test-project if requested for reproduction of the problem, it is very small...

      Anyone that have an idea what is going on?
      Any known workarounds?

      Regards,
      Magnus.