Package org.apache.commons.dbcp
Class DataSourceConnectionFactory
- java.lang.Object
-
- org.apache.commons.dbcp.DataSourceConnectionFactory
-
- All Implemented Interfaces:
ConnectionFactory
public class DataSourceConnectionFactory extends java.lang.Object implements ConnectionFactory
ADataSource
-based implementation ofConnectionFactory
.- Version:
- $Revision: 479137 $ $Date: 2006-11-25 10:51:48 -0500 (Sat, 25 Nov 2006) $
- Author:
- Rodney Waldhoff
-
-
Constructor Summary
Constructors Constructor Description DataSourceConnectionFactory(javax.sql.DataSource source)
DataSourceConnectionFactory(javax.sql.DataSource source, java.lang.String uname, java.lang.String passwd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.Connection
createConnection()
Create a newConnection
in an implementation specific fashion.
-
-
-
Method Detail
-
createConnection
public java.sql.Connection createConnection() throws java.sql.SQLException
Description copied from interface:ConnectionFactory
Create a newConnection
in an implementation specific fashion.- Specified by:
createConnection
in interfaceConnectionFactory
- Returns:
- a new
Connection
- Throws:
java.sql.SQLException
- if a database error occurs creating the connection
-
-