1 Reply Latest reply on Sep 16, 2004 2:43 PM by genman

    MDB , JMS and XA Transaction

    cwele

      -Is this possible that JBoss does not start XA transaction before onMessage() method ?
      I have the following situation:

      1. one MessageDrivenBean (with "class level" @ejb.transaction type="Required" tag)
      simply creates one entity EJB, then does transition by sending some XML message to the
      javax.jms.Queue , by using the following statement:

       qConnect = qFactory.createQueueConnection();
       session = qConnect.createQueueSession(true, 0);
       qConnect.start();
       qSender = session.createSender(q);
       ........
       qSender.send(xmlMsg);
      


      2. on the other side, second MDB (from the same .jar) listens on the Queue, but message
      simply does not arrive to that mdb. It seems like session fails to join to the CMT
      transaction; container simply does not commit them.

      - Because of that fact, after qSender.send() call , I decided to commit
      session manualy, by calling

      session.commit();

      -With this, xml message arrives to the second mdb without problems, BUT, after that,
      second mdb tries to find local interface of entity EJB from step 1.
      Unfortunately, FinderException throws, with this error message:

      javax.ejb.FinderException: Find failed:
      org.firebirdsql.jdbc.FBSQLException: GDS Exception. deadlock record from transaction 19474
      is stuck in limbo

      at
      org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:148)

      at
      org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:44)
      .......................

      - Now,it seems like container tries to commit session, but can"t do this,
      because of my own session.commit() call

      - So, without additional session.commit(), messages simply does not arrive to the second mdb; but with my own commit(), FinderException because of Firebird limbo transaction throws.

      How to check if jms adapter is configured for xa transactions ?
      Any advice ?