Package org.apache.tomcat.dbcp.dbcp2
Class DriverConnectionFactory
- java.lang.Object
- 
- org.apache.tomcat.dbcp.dbcp2.DriverConnectionFactory
 
- 
- All Implemented Interfaces:
- ConnectionFactory
 
 public class DriverConnectionFactory extends java.lang.Object implements ConnectionFactory ADriver-based implementation ofConnectionFactory.- Since:
- 2.0
 
- 
- 
Constructor SummaryConstructors Constructor Description DriverConnectionFactory(java.sql.Driver driver, java.lang.String connectString, java.util.Properties properties)Constructs a connection factory for a given Driver.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.ConnectioncreateConnection()Create a newConnectionin an implementation specific fashion.java.lang.StringgetConnectionString()java.sql.DrivergetDriver()java.util.PropertiesgetProperties()java.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
DriverConnectionFactorypublic DriverConnectionFactory(java.sql.Driver driver, java.lang.String connectString, java.util.Properties properties)Constructs a connection factory for a given Driver.- Parameters:
- driver- The Driver.
- connectString- The connection string.
- properties- The connection properties.
 
 
- 
 - 
Method Detail- 
createConnectionpublic java.sql.Connection createConnection() throws java.sql.SQLExceptionDescription copied from interface:ConnectionFactoryCreate a newConnectionin an implementation specific fashion.- Specified by:
- createConnectionin interface- ConnectionFactory
- Returns:
- a new Connection
- Throws:
- java.sql.SQLException- if a database error occurs creating the connection
 
 - 
getConnectionStringpublic java.lang.String getConnectionString() - Returns:
- The connection String.
- Since:
- 2.6.0
 
 - 
getDriverpublic java.sql.Driver getDriver() - Returns:
- The Driver.
- Since:
- 2.6.0
 
 - 
getPropertiespublic java.util.Properties getProperties() - Returns:
- The Properties.
- Since:
- 2.6.0
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-