HarvestableConnection, LabelableConnectionpublic interface WLConnection extends LabelableConnection, HarvestableConnection
WLConnection provide methods for the following:
Connection| Modifier and Type | Method | Description |
|---|---|---|
void |
applyConnectionLabel(java.lang.String key,
java.lang.String value) |
Applies connection labels on a borrowed connection while the
connection is open.
|
boolean |
clearCallableStatement(java.lang.String sql) |
Clears a callable statement from the Statement Cache
|
boolean |
clearCallableStatement(java.lang.String sql,
int resType,
int resConcurrency) |
Clears a callable statement from the Statement Cache
|
boolean |
clearPreparedStatement(java.lang.String sql) |
Clears a prepared statement from the Statement Cache
|
boolean |
clearPreparedStatement(java.lang.String sql,
int resType,
int resConcurrency) |
Clears a prepared statement from the Statement Cache
|
void |
clearStatementCache() |
Clears the statement cache.
|
java.util.Properties |
getConnectionLabels() |
Retrieves all the connection labels applied on this connection.
|
java.lang.String |
getPoolName() |
Returns the name of the connection pool to which this connection
belongs to.
|
int |
getReplayAttemptCount() |
Returns the Application Continuity replay attempts since the
last beginRequest on the connection.
|
java.util.Properties |
getUnmatchedConnectionLabels(java.util.Properties requestedLabels) |
Obtains all the requested labels that did not match the applied
labels on this connection when this connection was borrowed from
the pool.
|
java.sql.Connection |
getVendorConnection() |
Returns the underlying physical connection (the vendor connection) from a pooled
database connection (a logical connection).
|
java.sql.Connection |
getVendorConnectionSafe() |
Returns the underlying physical connection (the vendor connection) from a pooled
database connection (a logical connection).
|
boolean |
isValid() |
This method equals to isValid(15).
|
boolean |
isValid(int timeout) |
Returns true if connection is still valid.
|
void |
removeConnectionLabel(java.lang.String key) |
Removes the connection label with the given key from the connection
labels applied on this connection.
|
void |
setFailed() |
Force this connection to be destroyed by connection pool
|
isConnectionHarvestable, registerConnectionHarvestingCallback, removeConnectionHarvestingCallback, setConnectionHarvestablevoid clearStatementCache()
throws java.sql.SQLException
java.sql.SQLException - - if a database access error occursjava.sql.Connection getVendorConnection()
throws java.sql.SQLException
java.sql.SQLException - - if a database access error occursboolean clearCallableStatement(java.lang.String sql)
throws java.sql.SQLException
sql - - an SQL statement that may contain one or more '?' parameter
placeholders. Typically this statement is a JDBC function call
escape string.java.sql.SQLException - - if a database access error occursboolean clearCallableStatement(java.lang.String sql,
int resType,
int resConcurrency)
throws java.sql.SQLException
sql - - an SQL statement that may contain one or more '?' parameter
placeholders. Typically this statement is a JDBC function call
escape string.resType - - a result set type; one of
ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE,
or ResultSet.TYPE_SCROLL_SENSITIVEresConcurrency - - a concurrency type; one of
ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLEjava.sql.SQLException - - if a database access error occursboolean clearPreparedStatement(java.lang.String sql)
throws java.sql.SQLException
sql - - an SQL statement that may contain one or more '?'
IN parameter placeholdersjava.sql.SQLException - - if a database access error occursboolean clearPreparedStatement(java.lang.String sql,
int resType,
int resConcurrency)
throws java.sql.SQLException
sql - - an SQL statement that may contain one or more '?'
IN parameter placeholdersresType - - a result set type; one of
ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE,
or ResultSet.TYPE_SCROLL_SENSITIVEresConcurrency - - a concurrency type; one of
ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLEjava.sql.SQLException - - if a database access error occursjava.lang.String getPoolName()
void setFailed()
throws java.sql.SQLException
java.sql.SQLException - - if a connection pool error happenboolean isValid(int timeout)
throws java.sql.SQLException
timeout - - The time in seconds to wait for the database operation
used to validate the connection to complete.
A value of 0 indicates a timeout is not applied to the database operation.java.sql.SQLException - - if the value supplied for timeout is less then 0boolean isValid()
throws java.sql.SQLException
java.sql.SQLExceptionjava.sql.Connection getVendorConnectionSafe()
throws java.sql.SQLException
java.sql.SQLException - - if a database access error occursvoid applyConnectionLabel(java.lang.String key,
java.lang.String value)
throws java.sql.SQLException
LabelableConnectionUniversalConnectionPoolException.applyConnectionLabel in interface LabelableConnectionkey - The key of the connection label to be applied. Cannot
be null or an empty string.value - The value of the connection label to be applied. Can be
null or an empty string.java.sql.SQLException - If this connection was closed or the
key is null or an empty
string.void removeConnectionLabel(java.lang.String key)
throws java.sql.SQLException
LabelableConnectionremoveConnectionLabel in interface LabelableConnectionkey - The key of the connection label to be removed. Cannot be
null or an empty string.java.sql.SQLException - If this connection was closed or the
key is null or an empty
string.java.util.Properties getConnectionLabels()
throws java.sql.SQLException
LabelableConnectiongetConnectionLabels in interface LabelableConnectionjava.util.Properties object storing all the
applied labels as key/value pairs. Returns null if there are
no applied labels on this connection.java.sql.SQLException - If this connection was closed.java.util.Properties getUnmatchedConnectionLabels(java.util.Properties requestedLabels)
throws java.sql.SQLException
LabelableConnectionThis method is typically used to verify which labels in the requested labels are matched and which labels are not.
getUnmatchedConnectionLabels in interface LabelableConnectionrequestedLabels - The requested labels that borrowed this
connection from the pool.java.util.Properties object storing all the
requested labels that did not match the labels applied on this
connection. Returns null if there are none.java.sql.SQLException - If this connection was closed.int getReplayAttemptCount()