From djd@apache.org Tue Oct 19 17:05:25 2004 Return-Path: Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 65203 invoked by uid 500); 19 Oct 2004 17:05:25 -0000 Delivered-To: apmail-incubator-derby-cvs@incubator.apache.org Received: (qmail 65197 invoked by uid 99); 19 Oct 2004 17:05:25 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 19 Oct 2004 10:05:24 -0700 Received: (qmail 11370 invoked by uid 65534); 19 Oct 2004 17:05:23 -0000 Date: 19 Oct 2004 17:05:23 -0000 Message-ID: <20041019170523.11364.qmail@minotaur.apache.org> From: djd@apache.org To: derby-cvs@incubator.apache.org Subject: svn commit: rev 55075 - in incubator/derby/code/trunk/java/engine/org/apache/derby: iapi/jdbc iapi/reference impl/db jdbc X-Virus-Checked: Checked 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;