Class DriverConnectionFactory
java.lang.Object
org.apache.tomcat.dbcp.dbcp2.DriverConnectionFactory
- All Implemented Interfaces:
ConnectionFactory
A
Driver
-based implementation of ConnectionFactory
.- Since:
- 2.0
-
Constructor Summary
ConstructorDescriptionDriverConnectionFactory
(Driver driver, String connectString, Properties properties) Constructs a connection factory for a given Driver. -
Method Summary
Modifier and TypeMethodDescriptionCreate a newConnection
in an implementation specific fashion.Gets the connection String.Gets the JDBC Driver.Gets the properties.toString()
-
Constructor Details
-
DriverConnectionFactory
Constructs a connection factory for a given Driver.- Parameters:
driver
- The Driver.connectString
- The connection string.properties
- The connection properties.
-
-
Method Details
-
createConnection
Description copied from interface:ConnectionFactory
Create a newConnection
in an implementation specific fashion.- Specified by:
createConnection
in interfaceConnectionFactory
- Returns:
- a new
Connection
- Throws:
SQLException
- if a database error occurs creating the connection
-
getConnectionString
Gets the connection String.- Returns:
- The connection String.
- Since:
- 2.6.0
-
getDriver
-
getProperties
-
toString
-