Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-7503

[GSS](7.1.z) JBJCA-1358 - Container is not cleaning up container-managed JMSContext

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.3.CR1, 7.1.3.GA
    • 7.0.0.GA
    • EE, EJB, JCA, JMS
    • None
    • CR1
    • Hide

      1. Create a JMS Queue in the JMS subsystem at application server configuration
      2. Enable CCM, set DEBUG and ERROR to "true" :
      2. Create a SLSB to send messages
      3. Inject JMSContext in the SLSB
      4. Leave the JMSContext to be closed by the container as JMS 2 API suggests
      5. Please send a message or two using the SLSB
      6. The CCM would report a connection leak :

      2016-11-22 13:41:42,627 INFO [org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager] (Thread-1 (ActiveMQ-client-global-threads-460743742)) IJ000100: Closing a connection for you. Please close them yourself: org.apache.activemq.artemis.ra.ActiveMQRASession@3ee45bae: java.lang.Throwable: STACKTRACE
      ....
      ....

      Show
      1. Create a JMS Queue in the JMS subsystem at application server configuration 2. Enable CCM, set DEBUG and ERROR to "true" : 2. Create a SLSB to send messages 3. Inject JMSContext in the SLSB 4. Leave the JMSContext to be closed by the container as JMS 2 API suggests 5. Please send a message or two using the SLSB 6. The CCM would report a connection leak : 2016-11-22 13:41:42,627 INFO [org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager] (Thread-1 (ActiveMQ-client-global-threads-460743742)) IJ000100: Closing a connection for you. Please close them yourself: org.apache.activemq.artemis.ra.ActiveMQRASession@3ee45bae: java.lang.Throwable: STACKTRACE .... ....
    • EAP 7.1.3

      The container is not cleaning up container managed JMSContext, causing a connection leak.
      The JMS 2.0 API doc[1] states the following :
      <quote>
      Applications running in the Java EE web and EJB containers may alternatively inject a JMSContext into their application using the @Inject annotation. A JMSContext that is created in this way is described as being container-managed. A container-managed JMSContext will be closed automatically by the container.
      </quote>

      However the JCA's CacheConnectionManager (CCM) complains a connection leak if the application didn't explicitly close the JMSContext, which is not required for container managed JMSContext.

      [1] http://docs.oracle.com/javaee/7/api/javax/jms/JMSContext.html

        1. ejb-code.tar.bz2
          0.9 kB
        2. ccm-log.txt
          28 kB

              jondruse@redhat.com Jiri Ondrusek
              rhn-support-tywickra Tyronne Wickramarathne
              Peter Mackay Peter Mackay
              Peter Mackay Peter Mackay
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: