Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3602

javax.jms.JMSException: The resource is allready being used in transaction context.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 5.5.0, 5.5.1
    • None
    • None
    • None
    • SLES11sp1 64bits, Glassfish 2.1.1, activemq-5.5.0, jdk6
      Linux (unknow), Glassfish 3.1, activemq-5.5.1

    Description

      My error code:

      javax.ejb.EJBException: nested exception is: javax.jms.JMSException: The resource is allready being used in transaction context.
      javax.jms.JMSException: The resource is allready being used in transaction context.
      at org.apache.activemq.ra.ManagedTransactionContext.setUseSharedTxContext(ManagedTransactionContext.java:47)
      at org.apache.activemq.ra.ManagedSessionProxy.setUseSharedTxContext(ManagedSessionProxy.java:67)
      at org.apache.activemq.ra.ManagedConnectionProxy.createSessionProxy(ManagedConnectionProxy.java:122)
      at org.apache.activemq.ra.ManagedConnectionProxy.createSession(ManagedConnectionProxy.java:105)
      at ch.no.prod.mdb.ToProdMDB.publish(ToProdMDB.java:163)
      at ch.no.prod.mdb.ToProdMDB.onMessage(ToProdMDB.java:107)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011)
      at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175)
      at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2929)
      at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4020)
      at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1111)
      at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:74)
      at com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:179)
      at $Proxy62.onMessage(Unknown Source)
      at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:123)
      at org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:64)
      at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:833)
      at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:169)
      at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:77)
      at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
      javax.ejb.EJBException: nested exception is: javax.jms.JMSException: The resource is allready being used in transaction context.
      at ch.no.prod.mdb.ToProdMDB.publish(ToProdMDB.java:279)
      at ch.no.prod.mdb.ToProdMDB.onMessage(ToProdMDB.java:107)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011)
      at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175)
      at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2929)
      at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4020)
      at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1111)
      at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:74)
      at com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:179)
      at $Proxy62.onMessage(Unknown Source)
      at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:123)
      at org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:64)
      at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:833)
      at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:169)
      at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:77)
      at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)

      And more informations found on web : http://osdir.com/ml/general/2011-11/msg29999.html and http://activemq.2283324.n4.nabble.com/Suspect-a-race-condition-in-TransactionContext-td3780046.html

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              deamicis@bluewin.ch Nicolas De Amicis
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: