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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.0.0.GA
    • Fix Version/s: 7.1.3.CR1, 7.1.3.GA
    • Component/s: EE, EJB, JCA, JMS
    • Labels:
      None
    • Environment:

      JBoss-EAP-7.0.0
      JDK 1.8

    • Target Release:
    • Fix Build:
      CR1
    • Steps to Reproduce:
      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 .... ....
    • Sprint:
      EAP 7.1.3

      Description

      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

        Gliffy Diagrams

          Attachments

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

            Issue Links

              Activity

                People

                • Assignee:
                  jondruse Jiri Ondrusek
                  Reporter:
                  bershath27 Tyronne Wickramarathne
                  Tester:
                  Peter Mackay
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  12 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: