Class DriverManagerConnectionFactory
java.lang.Object
org.apache.commons.dbcp.DriverManagerConnectionFactory
- All Implemented Interfaces:
ConnectionFactory
A
DriverManager-based implementation of ConnectionFactory.- Version:
- $Revision: 746827 $ $Date: 2009-02-22 16:41:52 -0500 (Sun, 22 Feb 2009) $
- Author:
- Rodney Waldhoff, Ignacio J. Ortega, Dirk Verbeeck
-
Constructor Summary
ConstructorsConstructorDescriptionDriverManagerConnectionFactory(String connectUri, String uname, String passwd) Constructor for DriverManagerConnectionFactory.DriverManagerConnectionFactory(String connectUri, Properties props) Constructor for DriverManagerConnectionFactory. -
Method Summary
-
Constructor Details
-
DriverManagerConnectionFactory
Constructor for DriverManagerConnectionFactory.- Parameters:
connectUri- a database url of the formjdbc:subprotocol:subnameprops- a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included.
-
DriverManagerConnectionFactory
-
-
Method Details
-
createConnection
Description copied from interface:ConnectionFactoryCreate a newConnectionin an implementation specific fashion.- Specified by:
createConnectionin interfaceConnectionFactory- Returns:
- a new
Connection - Throws:
SQLException- if a database error occurs creating the connection
-