public class OraclePool extends Object
Constructor and Description |
---|
OraclePool(oracle.jdbc.pool.OracleDataSource ods)
Constructs an OraclePool instance based on a given OracleDataSource object.
|
OraclePool(String jdbcURL,
String user,
String password)
This method creates an OraclePool instance based on the given JDBC connection information.
|
OraclePool(String jdbcURL,
String user,
String password,
Properties connectionCacheProperties)
Construct an OraclePool instance using the specified JDBC URL, user, password and
connectionCacheProperties and a connection cache name.
|
OraclePool(String jdbcURL,
String user,
String password,
Properties connectionCacheProperties,
String connCacheName)
Constructs an OraclePool instance using the specified JDBC URL, user, password and
connectionCacheProperties and a connection cache name.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
This method closes the OraclePool object.
|
oracle.jdbc.OracleConnection |
getConnection()
Returns an Oracle object from the managed pool.
|
DataSource |
getDataSource()
Get the data source associated to this object
|
void |
releaseConnection(oracle.jdbc.OracleConnection conn)
Release the given connection by closing the connection and freeing up
the resources.
|
public OraclePool(oracle.jdbc.pool.OracleDataSource ods)
public OraclePool(String jdbcURL, String user, String password)
jdbcURL
- the JDBC URLuser
- user name to connect to the databasepassword
- password to connect to the databasepublic OraclePool(String jdbcURL, String user, String password, Properties connectionCacheProperties)
jdbcURL
- the JDBC URLuser
- user name to connect to the databasepassword
- password to connect to the databaseconnectionCacheProperties
- connection cache propertiespublic OraclePool(String jdbcURL, String user, String password, Properties connectionCacheProperties, String connCacheName)
jdbcURL
- the JDBC URLuser
- user name to connect to the databasepassword
- password to connect to the databaseconnectionCacheProperties
- connection cache propertiesconnCacheName
- connection cache namepublic void close()
public oracle.jdbc.OracleConnection getConnection() throws ConnectionSetupException
ConnectionSetupException
public DataSource getDataSource()
DataSource
object.public void releaseConnection(oracle.jdbc.OracleConnection conn)
conn
- an OracleConnection
objectCopyright © 2017 Oracle and/or its affiliates. All Rights Reserved.