org.apache.commons.dbcp2
Interface ConnectionFactory
-
- All Known Subinterfaces:
- XAConnectionFactory
- All Known Implementing Classes:
- DataSourceConnectionFactory, DataSourceXAConnectionFactory, DriverConnectionFactory, DriverManagerConnectionFactory, LocalXAConnectionFactory
public interface ConnectionFactory
Abstract factory interface for creatingConnection
s.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description Connection
createConnection()
Create a newConnection
in an implementation specific fashion.
-
-
-
Method Detail
-
createConnection
Connection createConnection() throws SQLException
Create a newConnection
in an implementation specific fashion.- Returns:
- a new
Connection
- Throws:
SQLException
- if a database error occurs creating the connection
-
-