db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r397678 - in /db/derby/code/trunk/java/client/org/apache/derby/client: ClientPooledConnection40.java ClientXAConnection40.java net/NetXAConnection.java net/NetXAConnection40.java
Date Thu, 27 Apr 2006 23:35:17 GMT
Author: rhillegas
Date: Thu Apr 27 16:35:15 2006
New Revision: 397678

URL: http://svn.apache.org/viewcvs?rev=397678&view=rev
Log:
DERBY_1254: Checked in Narayanan's patch DERBY_1254.diff, which simplifies and cleans up the
creation of JDBC4 NetConnections.

Removed:
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection40.java
Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection40.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java?rev=397678&r1=397677&r2=397678&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java
(original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java
Thu Apr 27 16:35:15 2006
@@ -27,7 +27,6 @@
 import javax.sql.StatementEventListener;
 import org.apache.derby.client.am.SqlException;
 import org.apache.derby.client.net.NetLogWriter;
-import org.apache.derby.client.net.NetXAConnection40;
 
 public class ClientPooledConnection40 extends ClientPooledConnection {
     
@@ -60,27 +59,5 @@
     
     public void removeStatementEventListener(StatementEventListener listener){
         throw new java.lang.UnsupportedOperationException();
-    }
-
-    /**
-     * creates and returns NetXAConnection40.
-     * @param ds
-     * @param logWriter
-     * @param user
-     * @param password
-     * @param rmId
-     * @return NetXAConnection
-     */
-    protected NetXAConnection getNetXAConnection (ClientBaseDataSource ds,
-                                  NetLogWriter logWriter,
-                                  String user,
-                                  String password,
-                                  int rmId) throws SqlException {
-        return new NetXAConnection40 (logWriter,
-                user,
-                password,
-                ds,
-                rmId,
-                true);
     }
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection40.java?rev=397678&r1=397677&r2=397678&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/ClientXAConnection40.java Thu
Apr 27 16:35:15 2006
@@ -25,7 +25,6 @@
 import org.apache.derby.client.am.SqlException;
 import org.apache.derby.client.net.NetLogWriter;
 import org.apache.derby.client.net.NetXAConnection;
-import org.apache.derby.client.net.NetXAConnection40;
 import org.apache.derby.jdbc.ClientDataSource;
 import org.apache.derby.jdbc.ClientXADataSource;
 
@@ -79,26 +78,4 @@
     public void addStatementEventListener(StatementEventListener listener) {
         throw new UnsupportedOperationException();
     }
-    
-        /**
-     * creates and returns NetXAConnection40.
-     * @param ds
-     * @param logWriter
-     * @param user
-     * @param password
-     * @param rmId
-     * @return NetXAConnection
-     */
-    protected NetXAConnection getNetXAConnection (ClientDataSource ds,
-                                  NetLogWriter logWriter,
-                                  String user,
-                                  String password,
-                                  int rmId) throws SqlException {
-        return new NetXAConnection40 (logWriter,
-                user,
-                password,
-                ds,
-                rmId,
-                true);
-    }    
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java?rev=397678&r1=397677&r2=397678&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java Thu Apr
27 16:35:15 2006
@@ -30,6 +30,8 @@
 import org.apache.derby.client.am.SqlException;
 import org.apache.derby.client.am.Statement;
 
+import org.apache.derby.jdbc.ClientDriver;
+
 public class NetXAConnection {    
     private NetConnection netCon;
     //---------------------constructors/finalizer---------------------------------
@@ -228,7 +230,7 @@
                            org.apache.derby.jdbc.ClientBaseDataSource dataSource,
                            int rmId,
                            boolean isXAConn) throws SqlException {        
-        return new NetConnection (netLogWriter, user, password, 
-                dataSource, rmId, isXAConn);
+        return (NetConnection)ClientDriver.getFactory().newNetConnection
+            (netLogWriter, user, password,dataSource, rmId, isXAConn);
     }
 }



Mime
View raw message