public class OraclePool
extends java.lang.Object
Constructor and Description |
---|
OraclePool(oracle.jdbc.pool.OracleDataSource ods)
Constructs an OraclePool instance based on a given OracleDataSource object.
|
OraclePool(java.lang.String jdbcURL, java.lang.String user, java.lang.String password)
This method creates an OraclePool instance based on the given JDBC connection information.
|
OraclePool(java.lang.String jdbcURL, java.lang.String user, java.lang.String password, java.util.Properties connectionCacheProperties)
Construct an OraclePool instance using the specified JDBC URL, user, password and connectionCacheProperties and a connection cache name.
|
OraclePool(java.lang.String jdbcURL, java.lang.String user, java.lang.String password, java.util.Properties connectionCacheProperties, java.lang.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.
|
javax.sql.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(java.lang.String jdbcURL, java.lang.String user, java.lang.String password)
jdbcURL
- the JDBC URLuser
- user name to connect to the databasepassword
- password to connect to the databasepublic OraclePool(java.lang.String jdbcURL, java.lang.String user, java.lang.String password, java.util.Properties connectionCacheProperties)
jdbcURL
- the JDBC URLuser
- user name to connect to the databasepassword
- password to connect to the databaseconnectionCacheProperties
- connection cache propertiespublic OraclePool(java.lang.String jdbcURL, java.lang.String user, java.lang.String password, java.util.Properties connectionCacheProperties, java.lang.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 javax.sql.DataSource getDataSource()
DataSource
object.public void releaseConnection(oracle.jdbc.OracleConnection conn)
conn
- an OracleConnection
objectCopyright © 2017, 2018 Oracle and/or its affiliates. All Rights Reserved.