ConnectionFactorypublic class DriverManagerConnectionFactory extends java.lang.Object implements ConnectionFactory
DriverManager-based implementation of ConnectionFactory.| Constructor | Description |
|---|---|
DriverManagerConnectionFactory(java.lang.String connectionUri) |
Constructor for DriverManagerConnectionFactory.
|
DriverManagerConnectionFactory(java.lang.String connectionUri,
java.lang.String userName,
java.lang.String userPassword) |
Constructor for DriverManagerConnectionFactory.
|
DriverManagerConnectionFactory(java.lang.String connectionUri,
java.util.Properties properties) |
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 connectionUri)
connectionUri - a database url of the form jdbc:subprotocol:subnamepublic DriverManagerConnectionFactory(java.lang.String connectionUri,
java.util.Properties properties)
connectionUri - a database url of the form jdbc:subprotocol:subnameproperties - 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 connectionUri,
java.lang.String userName,
java.lang.String userPassword)
connectionUri - a database url of the form jdbc:subprotocol:subnameuserName - the database useruserPassword - 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 © 2000-2018 Apache Software Foundation. All Rights Reserved.