db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: rev 53730 - incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc
Date Mon, 04 Oct 2004 16:15:45 GMT
Author: djd
Date: Mon Oct  4 09:15:44 2004
New Revision: 53730

Modified:
   incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
Log:
Fix Derby-24, method calls on a closed Connection from a PooledConnection no longer
cause connection closed events to be sent to any listeners.
Minor clean up of BrokeredConnection as well, remove an unused constructor, make the control
field final and remove incorrect comment and unused imports.


Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
Mon Oct  4 09:15:44 2004
@@ -19,8 +19,6 @@
 import java.sql.SQLException;
 import java.sql.SQLWarning;
 
-import org.apache.derby.iapi.services.io.StoredFormatIds;
-import org.apache.derby.iapi.services.io.Formatable;
 import org.apache.derby.impl.jdbc.Util;
 
 import java.io.ObjectOutput;
@@ -28,12 +26,7 @@
 
 /**
  * This is a rudimentary connection that delegates
- * EVERYTHING to Connection.  Its sole purpose is to
- * provide a way to replicate connections.  It has special
- * logic to reconstitute a connection on a server other
- * than where it was first run.
- *
- * @author jamie
+ * EVERYTHING to Connection.
  */
 public class BrokeredConnection implements Connection
 {
@@ -43,7 +36,7 @@
 
 	private static final String copyrightNotice = org.apache.derby.iapi.reference.Copyright.SHORT_2002_2004;
 
-	protected BrokeredConnectionControl control;
+	protected final BrokeredConnectionControl control;
 	private boolean isClosed;
 
 	/**
@@ -60,13 +53,6 @@
 	//
 	/////////////////////////////////////////////////////////////////////////
 
-	/**
-	 *	Public niladic constructor to satisfy Formatable interface.
-	 */
-	public	BrokeredConnection()
-	{
-	}
-
 	public	BrokeredConnection(BrokeredConnectionControl control)
 	{
 		this.control = control;
@@ -379,7 +365,8 @@
 	}
 
 	protected final void notifyException(SQLException sqle) {
-		control.notifyException(sqle);
+		if (!isClosed)
+			control.notifyException(sqle);
 	}
 
 	/**

Mime
View raw message