org.apache.commons.dbcp
public class DriverManagerConnectionFactory extends java.lang.Object implements ConnectionFactory
DriverManager-based implementation of ConnectionFactory.| Constructor and Description |
|---|
DriverManagerConnectionFactory(java.lang.String connectUri,
java.util.Properties props)
Constructor for DriverManagerConnectionFactory.
|
DriverManagerConnectionFactory(java.lang.String connectUri,
java.lang.String uname,
java.lang.String passwd)
Constructor for DriverManagerConnectionFactory.
|
| Modifier and Type | Method and Description |
|---|---|
java.sql.Connection |
createConnection()
Create a new
Connection in an
implementation specific fashion. |
public DriverManagerConnectionFactory(java.lang.String connectUri,
java.util.Properties props)
connectUri - a database url of the form
jdbc:subprotocol:subnameprops - a list of arbitrary string tag/value pairs as
connection arguments; normally at least a "user" and "password"
property should be included.public DriverManagerConnectionFactory(java.lang.String connectUri,
java.lang.String uname,
java.lang.String passwd)
connectUri - a database url of the form
jdbc:subprotocol:subnameuname - the database userpasswd - the user's passwordpublic java.sql.Connection createConnection()
throws java.sql.SQLException
ConnectionFactoryConnection in an
implementation specific fashion.createConnection in interface ConnectionFactoryConnectionjava.sql.SQLException - if a database error occurs creating the connectionCopyright © 2001-2004 Apache Software Foundation. Documenation generated September 23 2013.