ConnectionFactorypublic class DriverManagerConnectionFactory extends java.lang.Object implements ConnectionFactory
DriverManager-based implementation of ConnectionFactory.| Constructor | Description |
|---|---|
DriverManagerConnectionFactory(java.lang.String connectUri,
java.lang.String uname,
java.lang.String passwd) |
Constructor for DriverManagerConnectionFactory.
|
DriverManagerConnectionFactory(java.lang.String connectUri,
java.util.Properties props) |
Constructor for DriverManagerConnectionFactory.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.sql.Connection |
createConnection() |
Create a new
Connection in an
implementation specific fashion. |
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 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 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 April 15 2019.