public class DriverManagerConnectionFactory extends java.lang.Object implements ConnectionFactory
DriverManager-based implementation of ConnectionFactory.| Constructor and Description |
|---|
DriverManagerConnectionFactory(java.lang.String connectionUri)
Constructor for DriverManagerConnectionFactory.
|
DriverManagerConnectionFactory(java.lang.String connectionUri,
java.util.Properties properties)
Constructor for DriverManagerConnectionFactory.
|
DriverManagerConnectionFactory(java.lang.String connectionUri,
java.lang.String userName,
char[] userPassword)
Constructor for DriverManagerConnectionFactory.
|
DriverManagerConnectionFactory(java.lang.String connectionUri,
java.lang.String userName,
java.lang.String userPassword)
Constructor for DriverManagerConnectionFactory.
|
| Modifier and Type | Method and Description |
|---|---|
java.sql.Connection |
createConnection()
Create a new
Connection in an implementation specific fashion. |
java.lang.String |
getConnectionUri() |
java.util.Properties |
getProperties() |
java.lang.String |
getUserName() |
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,
char[] userPassword)
connectionUri - a database url of the form jdbc:subprotocol:subnameuserName - the database useruserPassword - the user's passwordpublic 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 connectionpublic java.lang.String getConnectionUri()
public java.util.Properties getProperties()
public java.lang.String getUserName()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.