0 Replies Latest reply on Nov 2, 2004 10:51 PM by karen_au

    MDB Rollback Configuration (Jboss3)

    karen_au

      I am using Jboss3 , I would like to rollback the message when there is any exception throw in the on Message() of my MDB.
      However, I have followed the configuration on the internet .
      I still have a exception like the followings . Is there any configuration that I missed ?? Any suggestions are appreciated .Thx.


      at java.lang.Thread.run(Unknown Source)
      java.lang.IllegalStateException: setRollbackOnly must only be called in the context of a transaction (EJB 2.0 - 15.5.1)
      at org.jboss.ejb.MessageDrivenEnterpriseContext$MessageDrivenContextImpl.setRollbackOnly(MessageDrivenEnterpriseContext.java:214)
      at com.gp.rfq.ejb.RFDMailMDB.onMessage(RFDMailMDB.java:98)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:391)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:88)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:228)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:92)
      at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:100)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
      at org.jboss.ejb.MessageDrivenContainer.invoke(MessageDrivenContainer.java:302)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:962)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1038)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:243)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:603)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:417)
      at org.jboss.mq.SpySession.run(SpySession.java:296)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:642)
      at java.lang.Thread.run(Unknown Source)