db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r1135976 - /db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java
Date Wed, 15 Jun 2011 09:33:15 GMT
Author: kristwaa
Date: Wed Jun 15 09:33:15 2011
New Revision: 1135976

URL: http://svn.apache.org/viewvc?rev=1135976&view=rev
Log:
DERBY-5269: Remove unused methods getSocketAndInputOutputStreams and checkAlternateServerHasEqualOrHigherProductLevel
in NetConnection 

Removed unused methods getSocketAndInputOutputStreams and
checkAlternateServerHasEqualOrHigherProductLevel.

Patch file: derby-5269-1a-remove_methods.diff


Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java?rev=1135976&r1=1135975&r2=1135976&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java Wed Jun
15 09:33:15 2011
@@ -1628,54 +1628,6 @@ public class NetConnection extends org.a
         return new org.apache.derby.client.am.SectionManager(collection, agent, databaseName);
     }
 
-    protected int getSocketAndInputOutputStreams(String server, int port, int clientSSLMode)
{
-        try {
-            netAgent_.socket_ = (java.net.Socket) java.security.AccessController.doPrivileged(new
OpenSocketAction(server, port, clientSSLMode));
-        } catch (java.security.PrivilegedActionException e) {
-            Exception openSocketException = e.getException();
-            if (netAgent_.loggingEnabled()) {
-                netAgent_.logWriter_.tracepoint("[net]", 101, "Client Re-route: " + openSocketException.getClass().getName()
+ " : " + openSocketException.getMessage());
-            }
-            return -1;
-        }
-
-        try {
-            netAgent_.rawSocketOutputStream_ = netAgent_.socket_.getOutputStream();
-            netAgent_.rawSocketInputStream_ = netAgent_.socket_.getInputStream();
-        } catch (java.io.IOException e) {
-            if (netAgent_.loggingEnabled()) {
-                netAgent_.logWriter_.tracepoint("[net]", 103, "Client Re-route: java.io.IOException
" + e.getMessage());
-            }
-            try {
-                netAgent_.socket_.close();
-            } catch (java.io.IOException doNothing) {
-            }
-            return -1;
-        }
-        return 0;
-    }
-
-    protected int checkAlternateServerHasEqualOrHigherProductLevel(ProductLevel orgLvl, int
orgServerType) {
-        if (orgLvl == null && orgServerType == 0) {
-            return 0;
-        }
-        ProductLevel alternateServerProductLvl =
-                netAgent_.netConnection_.databaseMetaData_.productLevel_;
-        boolean alternateServerIsEqualOrHigherToOriginalServer =
-                (alternateServerProductLvl.greaterThanOrEqualTo
-                (orgLvl.versionLevel_,
-                        orgLvl.releaseLevel_,
-                        orgLvl.modificationLevel_)) ? true : false;
-        // write an entry to the trace
-        if (!alternateServerIsEqualOrHigherToOriginalServer &&
-                netAgent_.loggingEnabled()) {
-            netAgent_.logWriter_.tracepoint("[net]",
-                    99,
-                    "Client Re-route failed because the alternate server is on a lower product
level than the origianl server.");
-        }
-        return (alternateServerIsEqualOrHigherToOriginalServer) ? 0 : -1;
-    }
-
     public boolean willAutoCommitGenerateFlow() {
         // this logic must be in sync with writeCommit() logic
         if (!autoCommit_) {



Mime
View raw message