org.apache.commons.dbcp
Class DataSourceConnectionFactory
java.lang.Object
org.apache.commons.dbcp.DataSourceConnectionFactory
- All Implemented Interfaces:
- ConnectionFactory
public class DataSourceConnectionFactory
- extends Object
- implements ConnectionFactory
A DataSource
-based implementation of ConnectionFactory
.
- Version:
- $Revision: 479137 $ $Date: 2006-11-25 10:51:48 -0500 (Sat, 25 Nov 2006) $
- Author:
- Rodney Waldhoff
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_uname
protected String _uname
_passwd
protected String _passwd
_source
protected DataSource _source
DataSourceConnectionFactory
public DataSourceConnectionFactory(DataSource source)
DataSourceConnectionFactory
public DataSourceConnectionFactory(DataSource source,
String uname,
String passwd)
createConnection
public Connection createConnection()
throws SQLException
- Description copied from interface:
ConnectionFactory
- Create a new
Connection
in an
implementation specific fashion.
- Specified by:
createConnection
in interface ConnectionFactory
- Returns:
- a new
Connection
- Throws:
SQLException
- if a database error occurs creating the connection
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.