Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A9D9A7C8B for ; Wed, 28 Sep 2011 09:07:09 +0000 (UTC) Received: (qmail 79474 invoked by uid 500); 28 Sep 2011 09:07:09 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 79424 invoked by uid 500); 28 Sep 2011 09:07:09 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 79415 invoked by uid 99); 28 Sep 2011 09:07:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Sep 2011 09:07:09 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Sep 2011 09:07:07 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 782AB28CDBE for ; Wed, 28 Sep 2011 09:06:45 +0000 (UTC) Date: Wed, 28 Sep 2011 09:06:45 +0000 (UTC) From: "Henrik Olsson (Commented) (JIRA)" To: dev@activemq.apache.org Message-ID: <511295263.3092.1317200805494.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (AMQ-2643) Closing a PooledConnection does not seem to return associated sessions to the SessionPool MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AMQ-2643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13116302#comment-13116302 ] Henrik Olsson commented on AMQ-2643: ------------------------------------ Attached a test case showing that continously requesting a connection (and a a session) from a ConnectionFactory that happens to be a PooledConnectionFactory and only closing the connection, not the session, eventually exhausts the session pool. This seems to break the contract of Connection.close since the official documentation for it states that "There is no need to close the sessions, producers, and consumers of a closed connection." > Closing a PooledConnection does not seem to return associated sessions to the SessionPool > ----------------------------------------------------------------------------------------- > > Key: AMQ-2643 > URL: https://issues.apache.org/jira/browse/AMQ-2643 > Project: ActiveMQ > Issue Type: Bug > Affects Versions: 5.2.0 > Reporter: Henrik Olsson > Attachments: SimpleTest.java > > > 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. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira