Package org.apache.commons.dbcp
Class DriverConnectionFactory
- java.lang.Object
-
- org.apache.commons.dbcp.DriverConnectionFactory
-
- All Implemented Interfaces:
ConnectionFactory
public class DriverConnectionFactory extends java.lang.Object implements ConnectionFactory
ADriver-based implementation ofConnectionFactory.- Version:
- $Revision: 479137 $ $Date: 2006-11-25 10:51:48 -0500 (Sat, 25 Nov 2006) $
- Author:
- Rodney Waldhoff
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String_connectUriprotected java.sql.Driver_driverprotected java.util.Properties_props
-
Constructor Summary
Constructors Constructor Description DriverConnectionFactory(java.sql.Driver driver, java.lang.String connectUri, java.util.Properties props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.ConnectioncreateConnection()Create a newConnectionin an implementation specific fashion.java.lang.StringtoString()
-
-
-
Method Detail
-
createConnection
public java.sql.Connection createConnection() throws java.sql.SQLExceptionDescription copied from interface:ConnectionFactoryCreate a newConnectionin an implementation specific fashion.- Specified by:
createConnectionin interfaceConnectionFactory- Returns:
- a new
Connection - Throws:
java.sql.SQLException- if a database error occurs creating the connection
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-