4 Replies Latest reply on Oct 24, 2001 6:25 AM by Peter Antman

    JMS transaction rolled back / timeout

    jean Newbie

      Hi jboss users,

      I'm using a MDB as a listener. For each message received (thoses messages are sended by a BMP session bean), a method, let's say doSomething() is called on another Session Bean (the "worker").
      My worker bean is performing a quite long task,
      and when this task ends, I get a "Rolling back JMS transaction" from the StdServerSession, due to a transaction timeout.
      Then the doSomething() method is called one more time, leading to SQL errors as it try to insert datas which are already saved by the previous call of the method.

      I tried several trans-attribute or BMP / CMP settings but never achieved to avoid the JMS transaction to be rolled back.

      My Worker bean has the trans-attribute "never".
      I tried both CMP - "not-supported" / "never" or BMP settings for the caller Bean, and the MDB without success.

      the Queue Session is created from the caller bean with the tx flag to false :

      queueSession = queueConnection.createQueueSession(
      // No transaction
      false,
      // Auto ack
      Session.AUTO_ACKNOWLEDGE);

      Does anyone know how to perform a long asynchronous task, using a MDB as a listener, whithout getting JMS tx timeouts ?

      thanks !