Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-9501

Container is not cleaning up container-managed JMSContext

    XMLWordPrintable

Details

    • 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 .... ....

    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

      Attachments

        Issue Links

          Activity

            People

              jondruse@redhat.com Jiri Ondrusek
              jondruse@redhat.com Jiri Ondrusek
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: