db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r980089 - /db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java
Date Wed, 28 Jul 2010 15:17:36 GMT
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;
         }    
         



Mime
View raw message