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 55075 - in incubator/derby/code/trunk/java/engine/org/apache/derby: iapi/jdbc iapi/reference impl/db jdbc
Date Tue, 19 Oct 2004 17:05:23 GMT
Author: djd
Date: Tue Oct 19 10:05:22 2004
New Revision: 55075

Modified:
   incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/ResourceAdapter.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Module.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java
Log:
Separate some JDBC 2 code from the JSR169 classes.

1) BrokeredConnections are only used for pooling connections,
   thus should not be referenced by the Driver169 class.

2) Simple fix to stop the BasicDatabase referencing XA classes
through an import of ResourceAdapter.



Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/ResourceAdapter.java
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/ResourceAdapter.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/ResourceAdapter.java
Tue Oct 19 10:05:22 2004
@@ -356,13 +356,6 @@
 	public static final String copyrightNotice = org.apache.derby.iapi.reference.Copyright.SHORT_1999_2004;
 
 	/**
-	 * Used to identify this interface when finding it with the Monitor.
-     **/
-	public static final String MODULE = 
-        "org.apache.derby.iapi.jdbc.ResourceAdapter";
-
-
-	/**
 		If a run time global transaction exists, the resource adapter will find
 		it and return a capsule of information so that a Connection can be
 		attached to the transaction. 

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Module.java
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Module.java	(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Module.java	Tue
Oct 19 10:05:22 2004
@@ -24,6 +24,6 @@
 	String JavaFactory ="org.apache.derby.iapi.services.compiler.JavaFactory";
 	String LockFactory = "org.apache.derby.iapi.services.locks.LockFactory";
 	String PropertyFactory = "org.apache.derby.iapi.services.property.PropertyFactory";
-
+	String ResourceAdapter = "org.apache.derby.iapi.jdbc.ResourceAdapter";
 
 }

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java	(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java	Tue
Oct 19 10:05:22 2004
@@ -60,7 +60,6 @@
 import org.apache.derby.iapi.jdbc.AuthenticationService;
 import org.apache.derby.iapi.services.uuid.UUIDFactory;
 import org.apache.derby.catalog.UUID;
-import org.apache.derby.iapi.jdbc.ResourceAdapter;
 
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -777,7 +776,7 @@
 			{
 				resourceAdapter = 
 					Monitor.bootServiceModule(create, this,
-											 ResourceAdapter.MODULE,
+											 org.apache.derby.iapi.reference.Module.ResourceAdapter,
 											 allParams);
 			}
 			catch (StandardException mse)

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java	(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java	Tue Oct 19
10:05:22 2004
@@ -28,8 +28,6 @@
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.i18n.MessageService;
 
-import org.apache.derby.iapi.jdbc.BrokeredConnection;
-import org.apache.derby.iapi.jdbc.BrokeredConnectionControl;
 import org.apache.derby.iapi.sql.ResultSet;
 
 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
@@ -427,9 +425,6 @@
 	 *
 	 */
 	public abstract Connection getNewNestedConnection(EmbedConnection conn);
-
-
-	public abstract BrokeredConnection newBrokeredConnection(BrokeredConnectionControl control);
 
 	/*
 	** methods to be overridden by subimplementations wishing to insert

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java
Tue Oct 19 10:05:22 2004
@@ -146,7 +146,8 @@
 	}
 
 	protected final Connection getNewCurrentConnectionHandle() {
-		Connection applicationConnection = currentConnectionHandle =  realConnection.getLocalDriver().newBrokeredConnection(this);
+		Connection applicationConnection = currentConnectionHandle =
+			((org.apache.derby.jdbc.Driver20) (realConnection.getLocalDriver())).newBrokeredConnection(this);
 		realConnection.setApplicationConnection(applicationConnection);
 		return applicationConnection;
 

Mime
View raw message