4 Replies Latest reply on May 30, 2003 12:44 PM by Adrian Brock

    Unable to call setRollbackOnly within MDB for 3.2.1

    Misak Boulatian Newbie

      I am using message driven beans with sonic mq. My deployment descriptor specifies transaction attribute required for onMessage method but I am not able to call setRollbackOnly method on messagedriven context. System throws: "14:03:29,636 ERROR [LogInterceptor] RuntimeException:
      java.lang.IllegalStateException: setRollbackOnly must only be called in the cont
      ext of a transaction (EJB 2.0 - 15.5.1)
      at org.jboss.ejb.MessageDrivenEnterpriseContext$MessageDrivenContextImpl
      .setRollbackOnly(MessageDrivenEnterpriseContext.java:214)
      at com.vantra.volts.core.messagedriven.execution.ExecutionMessageDrivenB
      ean.onMessage(ExecutionMessageDrivenBean.java:159)
      at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(Mess
      ageDrivenContainer.java:434)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
      ke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(Message
      DrivenInstanceInterceptor.java:62)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
      rceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
      torCMT.java:216)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
      04)
      at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityIn
      terceptor.java:90)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
      ryFinderInterceptor.java:122)
      at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenCont
      ainer.java:348)
      at org.jboss.ejb.Container.invoke(Container.java:674)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvo
      ker.java:732)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onM
      essage(JMSContainerInvoker.java:1020)
      at com.sonicsw.pso.jboss.SonicMQServerSession.handleMessage(SonicMQServe
      rSession.java:240)
      at com.sonicsw.pso.jboss.SonicMQServerSession.onMessage(SonicMQServerSes
      sion.java:163)
      at progress.message.jimpl.Session.nbB_(Unknown Source)
      at progress.message.jimpl.Session.run(Unknown Source)
      at progress.message.jimpl.QueueSession.run(Unknown Source)
      at com.sonicsw.pso.jboss.SonicMQServerSession.start(SonicMQServerSession
      .java:283)
      at progress.message.jimpl.aspi.cm.handleMessage(Unknown Source)
      at progress.message.zclient.MessageHandler.doNextWorkItem(Unknown Source
      )
      at progress.message.zclient.xk.threadMain(Unknown Source)
      at progress.message.zclient.DebugThread.run(Unknown Source)
      14:03:30,177 ERROR [JMSContainerInvoker] Exception in JMSCI message listener
      javax.ejb.EJBException: RuntimeException; CausedByException is:
      setRollbackOnly must only be called in the context of a transaction (EJB
      2.0 - 15.5.1)
      at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.j
      ava:356)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
      ryFinderInterceptor.java:122)
      at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenCont
      ainer.java:348)
      at org.jboss.ejb.Container.invoke(Container.java:674)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvo
      ker.java:732)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onM
      essage(JMSContainerInvoker.java:1020)
      at com.sonicsw.pso.jboss.SonicMQServerSession.handleMessage(SonicMQServe
      rSession.java:240)
      at com.sonicsw.pso.jboss.SonicMQServerSession.onMessage(SonicMQServerSes
      sion.java:163)
      at progress.message.jimpl.Session.nbB_(Unknown Source)
      at progress.message.jimpl.Session.run(Unknown Source)
      at progress.message.jimpl.QueueSession.run(Unknown Source)
      at com.sonicsw.pso.jboss.SonicMQServerSession.start(SonicMQServerSession
      .java:283)
      at progress.message.jimpl.aspi.cm.handleMessage(Unknown Source)
      at progress.message.zclient.MessageHandler.doNextWorkItem(Unknown Source
      )
      at progress.message.zclient.xk.threadMain(Unknown Source)
      at progress.message.zclient.DebugThread.run(Unknown Source)
      java.lang.IllegalStateException: setRollbackOnly must only be called in the cont
      ext of a transaction (EJB 2.0 - 15.5.1)
      at org.jboss.ejb.MessageDrivenEnterpriseContext$MessageDrivenContextImpl
      .setRollbackOnly(MessageDrivenEnterpriseContext.java:214)
      at com.vantra.volts.core.messagedriven.execution.ExecutionMessageDrivenB
      ean.onMessage(ExecutionMessageDrivenBean.java:159)
      at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(Mess
      ageDrivenContainer.java:434)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
      ke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(Message
      DrivenInstanceInterceptor.java:62)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
      rceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
      torCMT.java:216)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
      04)
      at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityIn
      terceptor.java:90)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
      ryFinderInterceptor.java:122)
      at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenCont
      ainer.java:348)
      at org.jboss.ejb.Container.invoke(Container.java:674)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvo
      ker.java:732)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onM
      essage(JMSContainerInvoker.java:1020)
      at com.sonicsw.pso.jboss.SonicMQServerSession.handleMessage(SonicMQServe
      rSession.java:240)
      at com.sonicsw.pso.jboss.SonicMQServerSession.onMessage(SonicMQServerSes
      sion.java:163)
      at progress.message.jimpl.Session.nbB_(Unknown Source)
      at progress.message.jimpl.Session.run(Unknown Source)
      at progress.message.jimpl.QueueSession.run(Unknown Source)
      at com.sonicsw.pso.jboss.SonicMQServerSession.start(SonicMQServerSession
      .java:283)
      at progress.message.jimpl.aspi.cm.handleMessage(Unknown Source)
      at progress.message.zclient.MessageHandler.doNextWorkItem(Unknown Source
      )
      at progress.message.zclient.xk.threadMain(Unknown Source)
      at progress.message.zclient.DebugThread.run(Unknown Source)".

      My context is transactional. Please let me know if I am doing something wrong.
      Thanks,
      Misak