oracle.jdbc.pool
Class OracleOCIConnectionPool
oracle.jdbc.pool.OracleDataSource
|
+--oracle.jdbc.pool.OracleOCIConnectionPool
- public class OracleOCIConnectionPool
- extends OracleDataSource
- See Also:
- Serialized Form
Type | Method |
void |
close()
|
void |
connectionClosed(oracle.jdbc.pool.OracleOCIConnection conn)
|
int |
getActiveSize()
Return the number of active or busy connections in the connection pool
Note that the count cannot be guaranteed on any invoking subsequent
OracleOCIConnectionCacheImpl method. |
OracleConnection |
getAliasedConnection(byte[] conId)
|
java.sql.Connection |
getConnection()
|
java.sql.Connection |
getConnection(java.lang.String us,
java.lang.String p)
|
int |
getConnectionIncrement()
Return the Increment for increasing the connections for the Cache. |
int |
getMaxLimit()
Return the Max limit on Connections. |
int |
getMinLimit()
Note: There are no individual setMin, setMax and setIncrement since
that needs to be done in one call to setPoolConfig
Return the minimum limit on the no of Connections. |
java.lang.String |
getNoWait()
Return the connection No-wait parameter
This attribute determines if retrial for a connection has to be done when
all connections in the pool are found to be busy and the number of connections
already reached max. |
java.util.Properties |
getPoolConfig()
|
int |
getPoolSize()
Return the number of physical connections in the connection pool
Note that the count cannot be guaranteed on any invoking subsequent
OracleOCIConnectionCacheImpl method. |
OracleConnection |
getProxyConnection(java.lang.String proxytype,
java.util.Properties prop)
|
oracle.jdbc.pool.Reference |
getReference()
|
int |
getStmtCacheSize()
Return the size of Statement Cache. |
int |
getTimeout()
Return the timeout
The connections idle for more than this time (seconds) are terminated periodically,
to maintain optimum number of open connections.This attribute can be set dynamically. |
boolean |
isDistributedTransEnabled()
|
boolean |
isPoolCreated()
|
boolean |
isStmtCacheEnabled()
|
void |
setPoolConfig(java.util.Properties prop)
|
void |
setStmtCacheSize(int size)
Set the statement cache size. |
void |
setStmtCacheSize(int size,
boolean clearMetaData)
Set the statement cache size. |
Methods inherited from class oracle.jdbc.pool.OracleDataSource |
getDatabaseName,
getDataSourceName,
getDescription,
getDriverType,
getLoginTimeout,
getLogWriter,
getNetworkProtocol,
getPortNumber,
getServerName,
getTNSEntryName,
getURL,
getUser,
setDatabaseName,
setDataSourceName,
setDescription,
setDriverType,
setLoginTimeout,
setLogWriter,
setNetworkProtocol,
setPassword,
setPortNumber,
setServerName,
setTNSEntryName,
setURL,
setUser |
m_connection_pool
public oracle.jdbc.pool.OracleOCIConnection m_connection_pool
IS_CONNECTION_POOLING
public static final java.lang.String IS_CONNECTION_POOLING
CONNPOOL_OBJECT
public static final java.lang.String CONNPOOL_OBJECT
CONNPOOL_LOGON_MODE
public static final java.lang.String CONNPOOL_LOGON_MODE
CONNECTION_POOL
public static final java.lang.String CONNECTION_POOL
CONNPOOL_CONNECTION
public static final java.lang.String CONNPOOL_CONNECTION
CONNPOOL_PROXY_CONNECTION
public static final java.lang.String CONNPOOL_PROXY_CONNECTION
CONNPOOL_ALIASED_CONNECTION
public static final java.lang.String CONNPOOL_ALIASED_CONNECTION
PROXY_USER_NAME
public static final java.lang.String PROXY_USER_NAME
PROXY_DISTINGUISHED_NAME
public static final java.lang.String PROXY_DISTINGUISHED_NAME
PROXY_CERTIFICATE
public static final java.lang.String PROXY_CERTIFICATE
PROXY_ROLES
public static final java.lang.String PROXY_ROLES
PROXY_NUM_ROLES
public static final java.lang.String PROXY_NUM_ROLES
PROXY_PASSWORD
public static final java.lang.String PROXY_PASSWORD
PROXYTYPE
public static final java.lang.String PROXYTYPE
PROXYTYPE_USER_NAME
public static final java.lang.String PROXYTYPE_USER_NAME
PROXYTYPE_DISTINGUISHED_NAME
public static final java.lang.String PROXYTYPE_DISTINGUISHED_NAME
PROXYTYPE_CERTIFICATE
public static final java.lang.String PROXYTYPE_CERTIFICATE
CONNECTION_ID
public static final java.lang.String CONNECTION_ID
CONNPOOL_MIN_LIMIT
public static java.lang.String CONNPOOL_MIN_LIMIT
CONNPOOL_MAX_LIMIT
public static java.lang.String CONNPOOL_MAX_LIMIT
CONNPOOL_INCREMENT
public static java.lang.String CONNPOOL_INCREMENT
CONNPOOL_ACTIVE_SIZE
public static java.lang.String CONNPOOL_ACTIVE_SIZE
CONNPOOL_POOL_SIZE
public static java.lang.String CONNPOOL_POOL_SIZE
CONNPOOL_TIMEOUT
public static java.lang.String CONNPOOL_TIMEOUT
CONNPOOL_NOWAIT
public static java.lang.String CONNPOOL_NOWAIT
CONNPOOL_IS_POOLCREATED
public static java.lang.String CONNPOOL_IS_POOLCREATED
TRANSACTIONS_DISTRIBUTED
public static final java.lang.String TRANSACTIONS_DISTRIBUTED
OracleOCIConnectionPool
public OracleOCIConnectionPool(java.lang.String us,
java.lang.String p,
java.lang.String url,
java.util.Properties info)
throws java.sql.SQLException
OracleOCIConnectionPool
public OracleOCIConnectionPool(java.lang.String us,
java.lang.String p,
java.lang.String url)
throws java.sql.SQLException
OracleOCIConnectionPool
public OracleOCIConnectionPool()
throws java.sql.SQLException
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Overrides:
- getConnection in class OracleDataSource
getConnection
public java.sql.Connection getConnection(java.lang.String us,
java.lang.String p)
throws java.sql.SQLException
- Overrides:
- getConnection in class OracleDataSource
getReference
public oracle.jdbc.pool.Reference getReference()
throws oracle.jdbc.pool.NamingException
- Overrides:
- getReference in class OracleDataSource
getProxyConnection
public OracleConnection getProxyConnection(java.lang.String proxytype,
java.util.Properties prop)
throws java.sql.SQLException
getAliasedConnection
public OracleConnection getAliasedConnection(byte[] conId)
throws java.sql.SQLException
close
public void close()
throws java.sql.SQLException
setPoolConfig
public void setPoolConfig(java.util.Properties prop)
throws java.sql.SQLException
getPoolConfig
public java.util.Properties getPoolConfig()
throws java.sql.SQLException
getActiveSize
public int getActiveSize()
throws java.sql.SQLException
- Return the number of active or busy connections in the connection pool
Note that the count cannot be guaranteed on any invoking subsequent
OracleOCIConnectionCacheImpl method. This should be used only as estimate
and perhaps for statistical analysis.
- Returns:
-
getPoolSize
public int getPoolSize()
throws java.sql.SQLException
- Return the number of physical connections in the connection pool
Note that the count cannot be guaranteed on any invoking subsequent
OracleOCIConnectionCacheImpl method. This should be used only as estimate
and perhaps for statistical analysis.
- Returns:
-
getTimeout
public int getTimeout()
throws java.sql.SQLException
- Return the timeout
The connections idle for more than this time (seconds) are terminated periodically,
to maintain optimum number of open connections.This attribute can be set dynamically.
If this attribute is not set, the connections are never timed out.
- Returns:
-
getNoWait
public java.lang.String getNoWait()
throws java.sql.SQLException
- Return the connection No-wait parameter
This attribute determines if retrial for a connection has to be done when
all connections in the pool are found to be busy and the number of connections
already reached max.
If this attribute is set, an error is thrown when all the connections are busy and
no more connections can be opened. Otherwise the call waits till it gets a connection.
- Returns:
-
getMinLimit
public int getMinLimit()
throws java.sql.SQLException
- Note: There are no individual setMin, setMax and setIncrement since
that needs to be done in one call to setPoolConfig
Return the minimum limit on the no of Connections.
- Returns:
- minimum limit on the no of Connections.
getMaxLimit
public int getMaxLimit()
throws java.sql.SQLException
- Return the Max limit on Connections.
- Returns:
- int Max no of Connections that can be opened.
getConnectionIncrement
public int getConnectionIncrement()
throws java.sql.SQLException
- Return the Increment for increasing the connections for the Cache.
- Returns:
- int Increment
isDistributedTransEnabled
public boolean isDistributedTransEnabled()
isPoolCreated
public boolean isPoolCreated()
connectionClosed
public void connectionClosed(oracle.jdbc.pool.OracleOCIConnection conn)
throws java.sql.SQLException
setStmtCacheSize
public void setStmtCacheSize(int size)
throws java.sql.SQLException
- Set the statement cache size. Default is 0.
You cannot set this for logicalhandles obtained from this pool.
If more than size cursors are already
cached than they will be closed. By default the
meta data of the cursor will be saved. Only
data and the state will be cleared. You need to call
this first to enable either type of Statement
caching. When both types of Statement caching are
enabled, the size is the total number
of cursors cached for both the schemes together.
- Parameters:
size
- Size of the Cache- Throws:
- java.sql.SQLException -
setStmtCacheSize
public void setStmtCacheSize(int size,
boolean clearMetaData)
throws java.sql.SQLException
- Set the statement cache size. Default is 0.
You cannot set this for logicalhandles obtained from this pool.
If more than size cursors are already
cached than they will be closed. By default, the
meta data of the cursor will be saved. But if
clearMetaData is set to true, even that will be cleared.
You need to call this first to enable either type of Statement
caching. When both types of Statement caching are
enabled, the size is the total number
of cursors cached for both the schemes together.
- Parameters:
size
- Size of the CacheclearMetaData
- Whether the state has to be cleared or not- Throws:
- java.sql.SQLException -
getStmtCacheSize
public int getStmtCacheSize()
- Return the size of Statement Cache.
- Returns:
- int Size of Statement Cache. If not set,
the default 0 is returned.
isStmtCacheEnabled
public boolean isStmtCacheEnabled()