Class DriverManagerConnectionFactory
java.lang.Object
org.datanucleus.store.rdbms.datasource.dbcp2.DriverManagerConnectionFactory
- All Implemented Interfaces:
ConnectionFactory
A
DriverManager-based implementation of ConnectionFactory.- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final Propertiesprivate final Stringprivate final char[] -
Constructor Summary
ConstructorsConstructorDescriptionDriverManagerConnectionFactory(String connectionUri) Constructor for DriverManagerConnectionFactory.DriverManagerConnectionFactory(String connectionUri, String userName, char[] userPassword) Constructor for DriverManagerConnectionFactory.DriverManagerConnectionFactory(String connectionUri, String userName, String userPassword) Constructor for DriverManagerConnectionFactory.DriverManagerConnectionFactory(String connectionUri, Properties properties) Constructor for DriverManagerConnectionFactory. -
Method Summary
-
Field Details
-
connectionUri
-
userName
-
userPassword
private final char[] userPassword -
properties
-
-
Constructor Details
-
DriverManagerConnectionFactory
Constructor for DriverManagerConnectionFactory.- Parameters:
connectionUri- a database url of the formjdbc:subprotocol:subname- Since:
- 2.2
-
DriverManagerConnectionFactory
Constructor for DriverManagerConnectionFactory.- Parameters:
connectionUri- a database url of the formjdbc:subprotocol:subnameproperties- a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included.
-
DriverManagerConnectionFactory
-
DriverManagerConnectionFactory
-
-
Method Details
-
createConnection
Description copied from interface:ConnectionFactoryCreate a newConnectionin an implementation specific fashion.- Specified by:
createConnectionin interfaceConnectionFactory- Returns:
- a new
Connection - Throws:
SQLException- if a database error occurs creating the connection
-
getConnectionUri
- Returns:
- The connection URI.
- Since:
- 2.6.0
-
getProperties
- Returns:
- The Properties.
- Since:
- 2.6.0
-
getUserName
- Returns:
- The user name.
- Since:
- 2.6.0
-