db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1126468 - /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Date Mon, 23 May 2011 12:22:43 GMT
Author: kahatlen
Date: Mon May 23 12:22:42 2011
New Revision: 1126468

URL: http://svn.apache.org/viewvc?rev=1126468&view=rev
Log:
DERBY-5239: Remove usages of DriverManager to obtain an Embedded Connection in Derby Server

Patch contributed by Ed Costello <edward.costello@orionhealth.com>.

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java?rev=1126468&r1=1126467&r2=1126468&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
(original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Mon May 23 12:22:42 2011
@@ -1004,8 +1004,7 @@ public final class NetworkServerControlI
 					}
 
 					// start the server.
-					Class.forName(CLOUDSCAPE_DRIVER).newInstance();
-					cloudscapeDriver = DriverManager.getDriver(Attribute.PROTOCOL);
+					cloudscapeDriver = (Driver) Class.forName(CLOUDSCAPE_DRIVER).newInstance();
 
 				}
 				catch (Exception e) {
@@ -3827,7 +3826,7 @@ public final class NetworkServerControlI
 	 	try {
 			//Note, we add database to the url so that we can allow additional
 			//url attributes
-			Connection conn = DriverManager.getConnection(Attribute.PROTOCOL+database, p);
+			Connection conn = getDriver().connect(Attribute.PROTOCOL+database, p);
 			// send warnings
 			SQLWarning warn = conn.getWarnings();
 			if (warn != null)



Mime
View raw message