commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp BasicDataSource.java
Date Sat, 20 Apr 2002 18:58:51 GMT
craigmcc    02/04/20 11:58:51

  Modified:    dbcp/src/java/org/apache/commons/dbcp BasicDataSource.java
  Log:
  Use DriverManager.getDriver() to create the new Driver instance (as is
  recommended in the JDBC JavaDocs.
  
  PR: Bugzilla #7728
  Submitted by:	James House <james at interobjective.com>
  
  Revision  Changes    Path
  1.4       +6 -5      jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java
  
  Index: BasicDataSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BasicDataSource.java	20 Apr 2002 18:31:01 -0000	1.3
  +++ BasicDataSource.java	20 Apr 2002 18:58:51 -0000	1.4
  @@ -1,6 +1,6 @@
  -/** $Header: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java,v
1.3 2002/04/20 18:31:01 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/04/20 18:31:01 $
  +/** $Header: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java,v
1.4 2002/04/20 18:58:51 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/04/20 18:58:51 $
    *
    * ====================================================================
    *
  @@ -64,6 +64,7 @@
   import java.util.Properties;
   import java.sql.Connection;
   import java.sql.Driver;
  +import java.sql.DriverManager;
   import java.sql.SQLException;
   import javax.sql.DataSource;
   import org.apache.commons.dbcp.DriverConnectionFactory;
  @@ -79,7 +80,7 @@
    * but provides a "one stop shopping" solution for basic requirements.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2002/04/20 18:31:01 $
  + * @version $Revision: 1.4 $ $Date: 2002/04/20 18:58:51 $
    */
   
   public class BasicDataSource implements DataSource {
  @@ -435,7 +436,7 @@
           // Create a JDBC driver instance
           Driver driver = null;
           try {
  -            driver = (Driver) driverClass.newInstance();
  +            driver = DriverManager.getDriver(url);
           } catch (Throwable t) {
               String message = "Cannot create JDBC driver of class '" +
                   driverClassName + "'";
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message