db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1460949 - in /db/derby/code/trunk/java/client/org/apache/derby: client/am/Configuration.java jdbc/ClientBaseDataSourceRoot.java jdbc/ClientDriver.java
Date Tue, 26 Mar 2013 02:19:19 GMT
Author: dag
Date: Tue Mar 26 02:19:19 2013
New Revision: 1460949

URL: http://svn.apache.org/r1460949
Log:
DERBY-6125 Code clean up in client driver

Patch 2derby-6125-01-b; removes dead code and refactors a mutable
public static.

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java?rev=1460949&r1=1460948&r2=1460949&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java Tue Mar
26 02:19:19 2013
@@ -35,14 +35,6 @@ public class Configuration {
 
 
     public static int traceFileSuffixIndex__ = 0;
-
-    public static int traceLevel__ = ClientDataSourceInterface.TRACE_ALL;
-
-    public static String traceFile__ = null;
-
-    public static String traceDirectory__ = null;
-
-    public static boolean traceFileAppend__ = false;
     public static final String jreLevel;// = "1.3.0"; // default level if unable to read
     public static final int jreLevelMajor;// = 1;
     public static final int jreLevelMinor;// = 3;
@@ -132,9 +124,10 @@ public class Configuration {
 
     // -----------------------Load resource bundles for the driver asap-----------
 
-    private static final String packageNameForDNC = "org.apache.derby.client"; // NOTUSED
-
-    public static SqlException exceptionsOnLoadResources = null; // used by ClientDriver
to accumulate load exceptions
+    /**
+     * Used by ClientDriver to accumulate load exceptions
+     */
+    private static SqlException exceptionsOnLoadResources = null;
 
     static {
         try {
@@ -175,6 +168,10 @@ public class Configuration {
         jreLevelMinor = _jreLevelMinor;
     }
 
+    public static SqlException getExceptionOnLoadResources() {
+        return exceptionsOnLoadResources;
+    }
+    
     /**
      * load product version information and accumulate exceptions
      */

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java?rev=1460949&r1=1460948&r2=1460949&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java Tue
Mar 26 02:19:19 2013
@@ -558,19 +558,6 @@ public abstract class ClientBaseDataSour
             traceFileSuffixIndex,
             traceLevel);
 
-        if (dncLogWriter != null) {
-            return dncLogWriter;
-        }
-        // compute global default dnc log writer if there is any
-        dncLogWriter = computeDncLogWriter(
-            null,
-            Configuration.traceDirectory__,
-            Configuration.traceFile__,
-            Configuration.traceFileAppend__,
-            "_global",
-            globaltraceFileSuffixIndex,
-            Configuration.traceLevel__);
-
         return dncLogWriter;
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java?rev=1460949&r1=1460948&r2=1460949&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java Tue Mar 26 02:19:19
2013
@@ -67,14 +67,15 @@ public class ClientDriver implements jav
 
     protected static void   registerMe( ClientDriver me )
     {
-        // This may possibly hit the race-condition bug of java 1.1.
         // The Configuration static clause should execute before the following line does.
-        if (Configuration.exceptionsOnLoadResources != null) {
+        SqlException ole = Configuration.getExceptionOnLoadResources();
+        
+        if (ole != null) {
+            SQLException e = ole.getSQLException();
             exceptionsOnLoadDriver__ =
-                    Utils.accumulateSQLException(
-                            Configuration.exceptionsOnLoadResources.getSQLException(),
-                            exceptionsOnLoadDriver__);
+                Utils.accumulateSQLException(e, exceptionsOnLoadDriver__);
         }
+        
         try {
             registeredDriver__ = me;
             java.sql.DriverManager.registerDriver(registeredDriver__);



Mime
View raw message