From derby-commits-return-12985-apmail-db-derby-commits-archive=db.apache.org@db.apache.org Wed Jul 28 15:19:01 2010 Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 41350 invoked from network); 28 Jul 2010 15:19:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Jul 2010 15:19:01 -0000 Received: (qmail 99063 invoked by uid 500); 28 Jul 2010 15:19:01 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 98995 invoked by uid 500); 28 Jul 2010 15:19:01 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 98988 invoked by uid 99); 28 Jul 2010 15:19:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jul 2010 15:19:01 +0000 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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jul 2010 15:19:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1A1F623889BF; Wed, 28 Jul 2010 15:17:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r980089 - /db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java Date: Wed, 28 Jul 2010 15:17:36 -0000 To: derby-commits@db.apache.org From: kristwaa@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100728151737.1A1F623889BF@eris.apache.org> Author: kristwaa Date: Wed Jul 28 15:17:35 2010 New Revision: 980089 URL: http://svn.apache.org/viewvc?rev=980089&view=rev Log: DERBY-4723: Using an instance lock to protect static shared data in EmbedPooledConnection Removed code using incorrect syncronization, as it was used for tracing only and the hashCode() output should suffice for that. Patch file: derby-4723-1a-remove_code.diff Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java?rev=980089&r1=980088&r2=980089&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java Wed Jul 28 15:17:35 2010 @@ -64,13 +64,6 @@ import javax.sql.ConnectionEvent; */ class EmbedPooledConnection implements javax.sql.PooledConnection, BrokeredConnectionControl { - - /** Static counter for connection ids */ - private static int idCounter = 0; - - /** The id for this connection. */ - private int connectionId; - /** the connection string */ private String connString; @@ -105,15 +98,8 @@ class EmbedPooledConnection implements j protected boolean isActive; - private synchronized int nextId() - { - return idCounter++; - } - EmbedPooledConnection(ReferenceableDataSource ds, String u, String p, boolean requestPassword) throws SQLException { - connectionId = nextId(); - dataSource = ds; username = u; password = p; @@ -560,7 +546,6 @@ class EmbedPooledConnection implements j connString = this.getClass().getName() + "@" + this.hashCode() + " " + - "(ID = " + connectionId + "), " + "Physical Connection = " + physicalConnString; }