public class DriverManagerConnectionFactory extends Object implements ConnectionFactory
DriverManager-based implementation of ConnectionFactory.| Modifier and Type | Field and Description |
|---|---|
protected String |
_connectUri |
protected String |
_passwd |
protected Properties |
_props |
protected String |
_uname |
| Constructor and Description |
|---|
DriverManagerConnectionFactory(String connectUri,
Properties props)
Constructor for DriverManagerConnectionFactory.
|
DriverManagerConnectionFactory(String connectUri,
String uname,
String passwd)
Constructor for DriverManagerConnectionFactory.
|
| Modifier and Type | Method and Description |
|---|---|
Connection |
createConnection()
Create a new
Connection in an
implementation specific fashion. |
protected String _connectUri
protected String _uname
protected String _passwd
protected Properties _props
public DriverManagerConnectionFactory(String connectUri, 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 Connection createConnection() throws SQLException
ConnectionFactoryConnection in an
implementation specific fashion.createConnection in interface ConnectionFactoryConnectionSQLException - if a database error occurs creating the connectionCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.