cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r646836 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/DriverDataSource.java
Date Thu, 10 Apr 2008 15:09:04 GMT
Author: aadamchik
Date: Thu Apr 10 08:09:01 2008
New Revision: 646836

URL: http://svn.apache.org/viewvc?rev=646836&view=rev
Log:
CAY-1024 Fall back on DriverManager to load driver
(instead of applying a patch, I added javadocs for a workaround)

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/DriverDataSource.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/DriverDataSource.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/DriverDataSource.java?rev=646836&r1=646835&r2=646836&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/DriverDataSource.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/DriverDataSource.java
Thu Apr 10 08:09:01 2008
@@ -52,7 +52,7 @@
      */
     private static Driver loadDriver(String driverClassName) throws SQLException {
 
-        Class driverClass;
+        Class<?> driverClass;
         try {
             driverClass = Class.forName(driverClassName, true, Thread
                     .currentThread()
@@ -77,7 +77,10 @@
     }
 
     /**
-     * Creates a new DriverDataSource.
+     * Creates a new DriverDataSource. If "driverClassName" is null, DriverDataSource will
+     * consult DriverManager for a registered driver for the given URL. So when specifying
+     * null, a user must take care of registering the driver. "connectionUrl" on the other
+     * hand must NOT be null.
      */
     public DriverDataSource(String driverClassName, String connectionUrl)
             throws SQLException {
@@ -85,6 +88,11 @@
     }
 
     /**
+     * Creates a new DriverDataSource. If "driverClassName" is null, DriverDataSource will
+     * consult DriverManager for a registered driver for the given URL. So when specifying
+     * null, a user must take care of registering the driver. "connectionUrl" on the other
+     * hand must NOT be null.
+     * 
      * @since 3.0
      */
     public DriverDataSource(String driverClassName, String connectionUrl,
@@ -98,7 +106,10 @@
     }
 
     /**
-     * Creates a new DriverDataSource wrapping a given Driver.
+     * Creates a new DriverDataSource wrapping a given Driver. If "driver" is null,
+     * DriverDataSource will consult DriverManager for a registered driver for the given
+     * URL. So when specifying null, a user must take care of registering the driver.
+     * "connectionUrl" on the other hand must NOT be null.
      * 
      * @since 1.1
      */



Mime
View raw message