Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 88021 invoked from network); 28 May 2008 14:26:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 May 2008 14:26:09 -0000 Received: (qmail 25487 invoked by uid 500); 28 May 2008 14:26:10 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 25269 invoked by uid 500); 28 May 2008 14:26:10 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 25253 invoked by uid 99); 28 May 2008 14:26:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2008 07:26:10 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2008 14:25:23 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 14FF6234C129 for ; Wed, 28 May 2008 07:25:45 -0700 (PDT) Message-ID: <1351850829.1211984745084.JavaMail.jira@brutus> Date: Wed, 28 May 2008 07:25:45 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-3401) Removing a ConnectionEventListener from a PooledConnection during its connectionClosed() callback causes other ConnectionEventListener callbacks to be missed In-Reply-To: <7603312.1202502428137.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-3401: -------------------------------------- Derby Info: (was: [Patch Available]) Committed d3401-statement_events.diff with revision 660959. > Removing a ConnectionEventListener from a PooledConnection during its connectionClosed() callback causes other ConnectionEventListener callbacks to be missed > ------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-3401 > URL: https://issues.apache.org/jira/browse/DERBY-3401 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.4.1.3 > Reporter: Daniel John Debrunner > Assignee: Knut Anders Hatlen > Priority: Minor > Attachments: d3401-statement_events.diff, d3401-statement_events.stat > > > A ConnectionEventListener should be able to remove itself as a listener during a callback without affecting any other callbacks. > DataSourceTest.subtestPooledRemoveListenerOnClose() tests the scenario but calls to it will be commented out in the fixture testPooledReuseOnClose() (using this bug number). > Issue is that such a remove will modify the eventListener Vector in EmbedPooledConnection while it is being enumerated over. > An idea for a fix would be to first change the Vector over to a new-style collection, such as an implementation of List, then work off a copy of the collection when calling the callbacks. I don't think eventListener needs to be a synchronized collection, its access should be already synchronized on EmbedPooledConnection. > I imagine that a similar issue exists for adding a new callback during callback processing, fixing this bug would fix that issue as well though no tests have been written for the add case. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.