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

Closing a PooledConnection does not seem to return associated sessions to the SessionPool

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.2.0
    • 5.6.0
    • None
    • None

    Description

      Reading the documentation at http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Connection.html#close() one would assume the associated session(s) would be closed/returned to the SessionPool when closing a connection: "There is no need to close the sessions, producers, and consumers of a closed connection."

      But it seems if you don't also explicitly call close() on the session you will run out of Session objects in the SessionPool.
      Looking at http://www.google.com/codesearch/p?hl=en#coOE0tRomSs/trunk/activemq-core/src/main/java/org/apache/activemq/pool/PooledConnection.java&d=9&l=69 trunk seems to have the same behaviour.

      Attachments

        1. PooledSessionExhaustionTest.java
          3 kB
          Timothy A. Bish
        2. SimpleTest.java
          3 kB
          Henrik Olsson

        Activity

          People

            tabish Timothy A. Bish
            henriko Henrik Olsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: