|
Oracle10g JDBC | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.jdbc.pool.OracleDataSource
oracle.jdbc.pool.OracleConnectionCacheImpl
Field Summary | |
static java.lang.String |
BUILD_DATE
Deprecated. |
static long |
DEFAULT_FIXED_WAIT_IDLE_TIME
Deprecated. The default timeout for FIXED_WAIT_SCHEME. |
static int |
DYNAMIC_SCHEME
Deprecated. |
static int |
FIXED_RETURN_NULL_SCHEME
Deprecated. |
static int |
FIXED_WAIT_SCHEME
Deprecated. |
static int |
ORAERROR_END_OF_FILE_ON_COM_CHANNEL
Deprecated. |
static int |
ORAERROR_IMMEDIATE_SHUTDOWN_IN_PROGRESS
Deprecated. |
static int |
ORAERROR_INIT_SHUTDOWN_IN_PROGRESS
Deprecated. |
static int |
ORAERROR_NET_IO_EXCEPTION
Deprecated. |
static int |
ORAERROR_NOT_CONNECTED_TO_ORACLE
Deprecated. |
static int |
ORAERROR_ORACLE_NOT_AVAILABLE
Deprecated. |
static int |
ORAERROR_SHUTDOWN_IN_PROGRESS_NO_CONN
Deprecated. |
static boolean |
PRIVATE_TRACE
Deprecated. |
static boolean |
TRACE
Deprecated. |
Fields inherited from class oracle.jdbc.pool.OracleDataSource |
isOracleDataSource |
Constructor Summary | |
OracleConnectionCacheImpl()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Default Constructor. Should have an explicit call to set the URL, User, Password and other DataSource details. A ConnectionPoolDataSource is created with these options from which PooledConnections can be created. |
|
OracleConnectionCacheImpl(javax.sql.ConnectionPoolDataSource ds)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Create an OracleConnectionCacheImpl with the given ConnectionPoolDataSource from which PooledConnections have to created. In which case, url, user name, password, and other DataSource properties set on this Cache are ignored. |
Method Summary | |
void |
clearWarnings()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Clear SQLWarning. Sets SQLWarning to null. |
void |
close()
Deprecated. Close the connection cache. |
void |
closeConnections()
Deprecated. |
void |
closePooledConnection(javax.sql.PooledConnection pc)
Deprecated. Invoked by the ConnectionEventListener when an error occurs on a PooledConnection/LogicalConnection signaling that it is no longer good to be used and can be closed. |
void |
closeSingleConnection(javax.sql.PooledConnection pc)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Close and remove a PooledConnection in the cache |
int |
getActiveSize()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Return the total no of connections that are being used. |
long |
getCacheFixedWaitIdleTime()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Returns the wait time for FIXED_WAIT_SCHEME. Returns -1 if it is not set. |
long |
getCacheFixedWaitTimeout()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Get the timeout for FIXED_WAIT_SCHEME |
long |
getCacheInactivityTimeout()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Get the connection cache Inactivity timeout |
int |
getCacheScheme()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Return the Caching Scheme being used. |
int |
getCacheSize()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Return the total no of connections in the Cache. |
long |
getCacheTimeToLiveTimeout()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Get the connection cache TTL timeout |
java.sql.Connection |
getConnection()
Deprecated. Attempt to establish a database connection. |
java.sql.Connection |
getConnection(java.lang.String user,
java.lang.String passwd)
Deprecated. Attempt to establish a database connection. |
long |
getConnectionCleanupInterval()
Deprecated. |
int[] |
getConnectionErrorCodes()
Deprecated. |
int |
getMaxLimit()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Return the Max limit on Connections. |
int |
getMinLimit()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Return the minimum limit on the no of Connections. |
javax.naming.Reference |
getReference()
Deprecated. |
int |
getStmtCacheSize()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Return the size of Statement Cache. |
long |
getThreadWakeUpInterval()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Get the timeout thread interval |
java.sql.SQLWarning |
getWarnings()
Deprecated. ... Use JDBC Implicit Connection Caching instead. Return current SQLWarning |
boolean |
isFatalConnectionError(java.sql.SQLException se)
Deprecated. |
void |
reusePooledConnection(javax.sql.PooledConnection pc)
Deprecated. Invoked by the ConnectionEventListener instance when Logical connection handles are closed signaling that the PooledConnection can be recycled into the pool for further use. |
void |
setCacheFixedWaitIdleTime(long idleTime)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Set the Waiting time for the FIXED_WAIT_SCHEME. This is the time in seconds for which the Connection cache would wait before returning with an exception. |
void |
setCacheFixedWaitTimeout(long timeout)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Set timeout for the FIXED_WAIT_SCHEME |
void |
setCacheInactivityTimeout(long timeout)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Set the Inactivity timeout for this connection cache |
void |
setCacheScheme(int s)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Set the Scheme for this Cache. Possible values are OracleConnectionCacheImpl.DYNAMIC_SCHEME OracleConnectionCacheImpl.FIXED_RETURN_NULL_SCHEME OracleConnectionCacheImpl.FIXED_WAIT_SCHEME |
void |
setCacheScheme(java.lang.String s)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Set the Scheme for this Cache. Possible values are OracleConnectionCacheImpl.DYNAMIC_SCHEME OracleConnectionCacheImpl.FIXED_RETURN_NULL_SCHEME OracleConnectionCacheImpl.FIXED_RETURN_SCHEME |
void |
setCacheTimeToLiveTimeout(long timeOut)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Set the TTL timeout for this connection cache |
void |
setConnectionCleanupInterval(long secs)
Deprecated. |
void |
setConnectionErrorCodes(int[] fatalErrorCodes)
Deprecated. |
void |
setConnectionPoolDataSource(javax.sql.ConnectionPoolDataSource ds)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Associate a ConnectionPoolDataSource datasource to the Cache. If one already exists and Connections are already opened then an Exception is thrown. If no connections are opened, then the new ConnectionPoolDataSource overwrites the previous one. |
void |
setMaxLimit(int l)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Set the maximum no of connections for the Cache. |
void |
setMinLimit(int l)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Set the minimum no of connections for the Cache. |
void |
setStmtCacheSize(int size)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Set the statement cache size. Default is 0. You cannot set this for logicalhandles obtained from PooledConnections.
If more than |
void |
setStmtCacheSize(int size,
boolean clearMetaData)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Set the statement cache size. Default is 0. You cannot set this for logicalhandles obtained from PooledConnections.
If more than |
void |
setThreadWakeUpInterval(long interval)
Deprecated. ... Use JDBC Implicit Connection Caching instead. Set the interval for connection cache timeout thread |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.DataSource |
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Field Detail |
public static final int ORAERROR_END_OF_FILE_ON_COM_CHANNEL
public static final int ORAERROR_NOT_CONNECTED_TO_ORACLE
public static final int ORAERROR_INIT_SHUTDOWN_IN_PROGRESS
public static final int ORAERROR_ORACLE_NOT_AVAILABLE
public static final int ORAERROR_IMMEDIATE_SHUTDOWN_IN_PROGRESS
public static final int ORAERROR_SHUTDOWN_IN_PROGRESS_NO_CONN
public static final int ORAERROR_NET_IO_EXCEPTION
public static final long DEFAULT_FIXED_WAIT_IDLE_TIME
public static final int DYNAMIC_SCHEME
public static final int FIXED_WAIT_SCHEME
public static final int FIXED_RETURN_NULL_SCHEME
public static final boolean TRACE
public static final boolean PRIVATE_TRACE
public static final java.lang.String BUILD_DATE
Constructor Detail |
public OracleConnectionCacheImpl() throws java.sql.SQLException
Default Constructor. Should have an explicit call to set the URL, User, Password and other DataSource details. A ConnectionPoolDataSource is created with these options from which PooledConnections can be created.
java.sql.SQLException
- error creating Cachepublic OracleConnectionCacheImpl(javax.sql.ConnectionPoolDataSource ds) throws java.sql.SQLException
Create an OracleConnectionCacheImpl with the given ConnectionPoolDataSource from which PooledConnections have to created. In which case, url, user name, password, and other DataSource properties set on this Cache are ignored.
ds
- a datasource from which the Cache can create
PooledConnections.
java.sql.SQLException
- error creating CacheMethod Detail |
public void setConnectionPoolDataSource(javax.sql.ConnectionPoolDataSource ds) throws java.sql.SQLException
ds
- a datasource from which the Cache can create
PooledConnections.
java.sql.SQLException
- A ConnectionPoolDataSource object
already exists and connections are already open.public java.sql.Connection getConnection() throws java.sql.SQLException
OracleDataSource
Attempt to establish a database connection.
getConnection
in interface javax.sql.DataSource
getConnection
in class OracleDataSource
java.sql.SQLException
- error creating Connection Object.public java.sql.Connection getConnection(java.lang.String user, java.lang.String passwd) throws java.sql.SQLException
OracleDataSource
Attempt to establish a database connection.
getConnection
in interface javax.sql.DataSource
getConnection
in class OracleDataSource
user
- the database user on whose behalf the Connection is
being made
java.sql.SQLException
- error creating Connection Object.public void reusePooledConnection(javax.sql.PooledConnection pc) throws java.sql.SQLException
Invoked by the ConnectionEventListener instance when Logical connection handles are closed signaling that the PooledConnection can be recycled into the pool for further use.
OracleConnectionCache
Invoked by the ConnectionEventListener instance when Logical connection handles are closed signaling that the PooledConnection can be recycled into the pool for further use.
reusePooledConnection
in interface OracleConnectionCache
pc
- The pooled connection object that needs to be recylced.
java.sql.SQLException
- error in recycling the PooledConnection.public void closePooledConnection(javax.sql.PooledConnection pc) throws java.sql.SQLException
Invoked by the ConnectionEventListener when an error occurs on a PooledConnection/LogicalConnection signaling that it is no longer good to be used and can be closed.
OracleConnectionCache
Invoked by the ConnectionEventListener when an error occurs on a PooledConnection/LogicalConnection signaling that it is no longer good to be used and can be closed.
closePooledConnection
in interface OracleConnectionCache
pc
- The pooled connection object that has to be closed
because of an error.
java.sql.SQLException
- error in closing the PooledConnectionpublic void closeSingleConnection(javax.sql.PooledConnection pc) throws java.sql.SQLException
java.sql.SQLException
public void close() throws java.sql.SQLException
Physically close all the pooled connections in the cache and free all the resources.
OracleConnectionCache
close
in interface OracleConnectionCache
close
in class OracleDataSource
java.sql.SQLException
- error in closing the PooledConnectionpublic void closeConnections()
public void setConnectionCleanupInterval(long secs) throws java.sql.SQLException
java.sql.SQLException
public long getConnectionCleanupInterval() throws java.sql.SQLException
java.sql.SQLException
public void setConnectionErrorCodes(int[] fatalErrorCodes) throws java.sql.SQLException
java.sql.SQLException
public int[] getConnectionErrorCodes() throws java.sql.SQLException
java.sql.SQLException
public boolean isFatalConnectionError(java.sql.SQLException se)
public void setMinLimit(int l) throws java.sql.SQLException
l
- Minimum no. of Connections.
java.sql.SQLException
public int getMinLimit()
public void setMaxLimit(int l) throws java.sql.SQLException
l
- maximum no. of Connections.
java.sql.SQLException
public int getMaxLimit()
public int getCacheScheme()
public void setCacheScheme(int s) throws java.sql.SQLException
java.sql.SQLException
public void setCacheScheme(java.lang.String s) throws java.sql.SQLException
java.sql.SQLException
public int getActiveSize()
public int getCacheSize()
public void setCacheTimeToLiveTimeout(long timeOut) throws java.sql.SQLException
Set the TTL timeout for this connection cache
java.sql.SQLException
- raises SQLWarning, if an invalid timeout is specifiedpublic void setCacheInactivityTimeout(long timeout) throws java.sql.SQLException
Set the Inactivity timeout for this connection cache
java.sql.SQLException
- raises SQLWarning, if an invalid timeout is specifiedpublic void setCacheFixedWaitTimeout(long timeout) throws java.sql.SQLException
Set timeout for the FIXED_WAIT_SCHEME
java.sql.SQLException
- raises SQLWarning, if an invalid timeout is specifiedpublic long getCacheTimeToLiveTimeout() throws java.sql.SQLException
Get the connection cache TTL timeout
java.sql.SQLException
public long getCacheInactivityTimeout() throws java.sql.SQLException
Get the connection cache Inactivity timeout
java.sql.SQLException
public long getCacheFixedWaitTimeout() throws java.sql.SQLException
Get the timeout for FIXED_WAIT_SCHEME
java.sql.SQLException
public void setThreadWakeUpInterval(long interval) throws java.sql.SQLException
Set the interval for connection cache timeout thread
java.sql.SQLException
- raises SQLWarning, if an invalid interval is specifiedpublic long getThreadWakeUpInterval() throws java.sql.SQLException
Get the timeout thread interval
java.sql.SQLException
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
Return current SQLWarning
java.sql.SQLException
public void clearWarnings() throws java.sql.SQLException
Clear SQLWarning. Sets SQLWarning to null.
java.sql.SQLException
public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
getReference
in class OracleDataSource
javax.naming.NamingException
public void setStmtCacheSize(int size) throws java.sql.SQLException
If more than
size
- Size of the Cache
java.sql.SQLException
public void setStmtCacheSize(int size, boolean clearMetaData) throws java.sql.SQLException
If more than
size
- Size of the CacheclearMetaData
- Whether the state has to be cleared or not
java.sql.SQLException
public int getStmtCacheSize()
public void setCacheFixedWaitIdleTime(long idleTime) throws java.sql.SQLException
java.sql.SQLException
public long getCacheFixedWaitIdleTime() throws java.sql.SQLException
java.sql.SQLException
|
Oracle10g JDBC | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |