1 Reply Latest reply on Oct 25, 2002 12:56 AM by Alwyn Schoeman

    Spurious rollback messages from MDBs

    Brian Dueck Newbie


      I'm running into a problem with MDBs that I'm hoping someone can help me with. I'm running JBoss 2.4.4 (plain vanilla config) on JDK 1.3.1.

      After making a small modification to the HelloMDB from the JBoss examples, I'm beginning to get rollback exceptions from the server. The modification was to add a 1 second time delay to the onMessage() method of HelloMDB - the purpose of this is to simulate real work being done on the server, thereby testing JBoss's ability to handle concurrent message delivery across the pool of MDB instances.

      public void onMessage(Message message) {
      System.err.println(Thread.currentThread().toString() + " START Bean got message " + message.toString() );
      catch (InterruptedException e)
      System.err.println(Thread.currentThread().toString() + " END Bean got message " + message.toString() );

      After adding this delay and deploying the (otherwise unmodified) example, the server begins emitting the following message after the MDB returns from onMessage().

      [ERROR,StdServerSession] failed to commit/rollback
      at org.jboss.mq.SpyXAResource.commit(SpyXAResource.java:102)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:284)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:565)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:376)
      at org.jboss.mq.SpySession.run(SpySession.java:248)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:172)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:725)
      at java.lang.Thread.run(Thread.java:484)

      Note that if I tweek the delay value down from 1 second to 50-100ms the message appears less frequently (i.e. some message deliveries succeed, others fail).

      Thanks in advance for your help,

      Brian Dueck