|
Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.1.2) Part Number E27170-02 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WLConnection
A WLConnection provides methods not supported by java.sql.Connection.
WLConnection provide methods for the following:
Connection
Method Summary | |
---|---|
void |
applyConnectionLabel(String key,
String value)
Applies connection labels on a borrowed connection while the connection is open. |
boolean |
clearCallableStatement(String sql)
Clears a callable statement from the Statement Cache |
boolean |
clearCallableStatement(String sql,
int resType,
int resConcurrency)
Clears a callable statement from the Statement Cache |
boolean |
clearPreparedStatement(String sql)
Clears a prepared statement from the Statement Cache |
boolean |
clearPreparedStatement(String sql,
int resType,
int resConcurrency)
Clears a prepared statement from the Statement Cache |
void |
clearStatementCache()
Clears the statement cache. |
Properties |
getConnectionLabels()
Retrieves all the connection labels applied on this connection. |
String |
getPoolName()
Returns the name of the connection pool to which this connection belongs to. |
Properties |
getUnmatchedConnectionLabels(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. |
Connection |
getVendorConnection()
Returns the underlying physical connection (the vendor connection) from a pooled database connection (a logical connection). |
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(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 |
Methods inherited from interface oracle.ucp.jdbc.HarvestableConnection |
---|
isConnectionHarvestable, registerConnectionHarvestingCallback, removeConnectionHarvestingCallback, setConnectionHarvestable |
Method Detail |
---|
void clearStatementCache() throws SQLException
SQLException
- - if a database access error occursConnection getVendorConnection() throws SQLException
SQLException
- - if a database access error occursboolean clearCallableStatement(String sql) throws SQLException
sql
- - an SQL statement that may contain one or more '?' parameter
placeholders. Typically this statement is a JDBC function call
escape string.
SQLException
- - if a database access error occursboolean clearCallableStatement(String sql, int resType, int resConcurrency) throws 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_UPDATABLE
SQLException
- - if a database access error occursboolean clearPreparedStatement(String sql) throws SQLException
sql
- - an SQL statement that may contain one or more '?'
IN parameter placeholders
SQLException
- - if a database access error occursboolean clearPreparedStatement(String sql, int resType, int resConcurrency) throws 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_UPDATABLE
SQLException
- - if a database access error occursString getPoolName()
void setFailed() throws SQLException
SQLException
- - if a connection pool error happenboolean isValid(int timeout) throws 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.
SQLException
- - if the value supplied for timeout is less then 0boolean isValid() throws SQLException
SQLException
Connection getVendorConnectionSafe() throws SQLException
SQLException
- - if a database access error occursvoid applyConnectionLabel(String key, String value) throws SQLException
LabelableConnection
UniversalConnectionPoolException
.
applyConnectionLabel
in interface LabelableConnection
key
- 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.
SQLException
- If this connection was closed or the
key is null
or an empty
string.void removeConnectionLabel(String key) throws SQLException
LabelableConnection
removeConnectionLabel
in interface LabelableConnection
key
- The key of the connection label to be removed. Cannot be
null
or an empty string.
SQLException
- If this connection was closed or the
key is null
or an empty
string.Properties getConnectionLabels() throws SQLException
LabelableConnection
getConnectionLabels
in interface LabelableConnection
java.util.Properties
object storing all the
applied labels as key/value pairs. Returns null if there are
no applied labels on this connection.
SQLException
- If this connection was closed.Properties getUnmatchedConnectionLabels(Properties requestedLabels) throws SQLException
LabelableConnection
This method is typically used to verify which labels in the requested labels are matched and which labels are not.
getUnmatchedConnectionLabels
in interface LabelableConnection
requestedLabels
- 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.
SQLException
- If this connection was closed.
|
Copyright 1996, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.1.2) Part Number E27170-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |