Package com.mchange.v2.c3p0
Class DriverManagerDataSourceFactory
java.lang.Object
com.mchange.v2.c3p0.DriverManagerDataSourceFactory
Deprecated.
A static factory that creates DataSources which simply forward calls to java.sql.DriverManager without any pooling or other fanciness.
The DataSources returned are Refereneable and Serializable; they should be suitable for placement in a wide variety of JNDI Naming Services.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DataSource
Deprecated.Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.static DataSource
Deprecated.Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.static DataSource
Deprecated.Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.static DataSource
Deprecated.Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.static DataSource
create
(String driverClass, String jdbcUrl, String dfltUser, String dfltPassword, String refFactoryLoc) Deprecated.Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.static DataSource
create
(String driverClass, String jdbcUrl, Properties props, String refFactoryLoc) Deprecated.Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.
-
Method Details
-
create
public static DataSource create(String driverClass, String jdbcUrl, String dfltUser, String dfltPassword, String refFactoryLoc) throws SQLException Deprecated.Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.- Parameters:
driverClass
- a jdbc driver class that can resolve jdbcUrl.jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.dfltUser
- a username (may be null) for authentication to the RDBMSdfltPassword
- a password (may be null) for authentication to the RDBMSrefFactoryLoc
- a codebase url where JNDI clients can find the c3p0 libraries. Use null if clients will be expected to have the libraries available locally.- Throws:
SQLException
-
create
public static DataSource create(String driverClass, String jdbcUrl, Properties props, String refFactoryLoc) throws SQLException Deprecated.Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.- Parameters:
driverClass
- a jdbc driver class that can resolve jdbcUrl.jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.props
- propertis object that should be passed to DriverManager.getConnection()refFactoryLoc
- a codebase url where JNDI clients can find the c3p0 libraries. Use null if clients will be expected to have the libraries available locally.- Throws:
SQLException
-
create
public static DataSource create(String driverClass, String jdbcUrl, String dfltUser, String dfltPassword) throws SQLException Deprecated.Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.- Parameters:
driverClass
- a jdbc driver class that can resolve jdbcUrl.jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.dfltUser
- a username (may be null) for authentication to the RDBMSdfltPassword
- a password (may be null) for authentication to the RDBMS- Throws:
SQLException
-
create
Deprecated.Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.- Parameters:
driverClass
- a jdbc driver class that can resolve jdbcUrl.jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.- Throws:
SQLException
-
create
public static DataSource create(String jdbcUrl, String dfltUser, String dfltPassword) throws SQLException Deprecated.Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.Warning: since you do not set the driver class, the resulting DataSource will be less suitable for use via JNDI: JNDI clients will have to know the driver class and make sure themselves that it is preloaded!!!
- Parameters:
jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.dfltUser
- a username (may be null) for authentication to the RDBMSdfltPassword
- a password (may be null) for authentication to the RDBMS- Throws:
SQLException
-
create
Deprecated.Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.Warning: since you do not set the driver class, the resulting DataSource will be less suitable for use via JNDI: JNDI clients will have to know the driver class and make sure themselves that it is preloaded!!!
- Parameters:
jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.- Throws:
SQLException
-
DataSources
. See examples.