private class PoolingDataSource.PoolGuardConnectionWrapper extends DelegatingConnection
AbandonedTrace.AbandonedObjectException| Modifier and Type | Field and Description |
|---|---|
private java.sql.Connection |
delegate |
_closed, _conn| Constructor and Description |
|---|
PoolGuardConnectionWrapper(java.sql.Connection delegate) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkOpen() |
void |
clearWarnings() |
void |
close()
Closes the underlying connection, and close
any Statements that were not explicitly closed.
|
void |
commit() |
java.sql.Statement |
createStatement() |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency) |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
boolean |
equals(java.lang.Object obj)
This method considers two objects to be equal
if the underlying jdbc objects are equal.
|
boolean |
getAutoCommit() |
java.lang.String |
getCatalog() |
java.sql.Connection |
getDelegate()
Returns my underlying
Connection. |
int |
getHoldability() |
java.sql.Connection |
getInnermostDelegate()
If my underlying
Connection is not a
DelegatingConnection, returns it,
otherwise recursively invokes this method on
my delegate. |
java.sql.DatabaseMetaData |
getMetaData() |
int |
getTransactionIsolation() |
java.util.Map |
getTypeMap() |
java.sql.SQLWarning |
getWarnings() |
int |
hashCode() |
boolean |
innermostDelegateEquals(java.sql.Connection c)
Compares innermost delegate to the given connection.
|
boolean |
isClosed() |
boolean |
isReadOnly() |
java.lang.String |
nativeSQL(java.lang.String sql) |
java.sql.CallableStatement |
prepareCall(java.lang.String sql) |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency) |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames) |
void |
releaseSavepoint(java.sql.Savepoint savepoint) |
void |
rollback() |
void |
rollback(java.sql.Savepoint savepoint) |
void |
setAutoCommit(boolean autoCommit) |
void |
setCatalog(java.lang.String catalog) |
void |
setHoldability(int holdability) |
void |
setReadOnly(boolean readOnly) |
java.sql.Savepoint |
setSavepoint() |
java.sql.Savepoint |
setSavepoint(java.lang.String name) |
void |
setTransactionIsolation(int level) |
void |
setTypeMap(java.util.Map map) |
java.lang.String |
toString()
Returns a string representation of the metadata associated with
the innnermost delegate connection.
|
abort, activate, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStruct, getClientInfo, getClientInfo, getDelegateInternal, getInnermostDelegateInternal, getNetworkTimeout, getSchema, handleException, isValid, isWrapperFor, passivate, setClientInfo, setClientInfo, setDelegate, setNetworkTimeout, setSchema, unwrapaddTrace, clearTrace, getConfig, getLastUsed, getTrace, printStackTrace, removeTrace, setLastUsed, setLastUsed, setStackTracePoolGuardConnectionWrapper(java.sql.Connection delegate)
protected void checkOpen()
throws java.sql.SQLException
checkOpen in class DelegatingConnectionjava.sql.SQLExceptionpublic void close()
throws java.sql.SQLException
DelegatingConnectionclose in interface java.lang.AutoCloseableclose in interface java.sql.Connectionclose in class DelegatingConnectionjava.sql.SQLExceptionpublic boolean isClosed()
throws java.sql.SQLException
isClosed in interface java.sql.ConnectionisClosed in class DelegatingConnectionjava.sql.SQLExceptionpublic void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.ConnectionclearWarnings in class DelegatingConnectionjava.sql.SQLExceptionpublic void commit()
throws java.sql.SQLException
commit in interface java.sql.Connectioncommit in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.Statement createStatement()
throws java.sql.SQLException
createStatement in interface java.sql.ConnectioncreateStatement in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
createStatement in interface java.sql.ConnectioncreateStatement in class DelegatingConnectionjava.sql.SQLExceptionpublic boolean innermostDelegateEquals(java.sql.Connection c)
DelegatingConnectioninnermostDelegateEquals in class DelegatingConnectionc - connection to compare innermost delegate withcpublic boolean getAutoCommit()
throws java.sql.SQLException
getAutoCommit in interface java.sql.ConnectiongetAutoCommit in class DelegatingConnectionjava.sql.SQLExceptionpublic java.lang.String getCatalog()
throws java.sql.SQLException
getCatalog in interface java.sql.ConnectiongetCatalog in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.DatabaseMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface java.sql.ConnectiongetMetaData in class DelegatingConnectionjava.sql.SQLExceptionpublic int getTransactionIsolation()
throws java.sql.SQLException
getTransactionIsolation in interface java.sql.ConnectiongetTransactionIsolation in class DelegatingConnectionjava.sql.SQLExceptionpublic java.util.Map getTypeMap()
throws java.sql.SQLException
getTypeMap in interface java.sql.ConnectiongetTypeMap in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
getWarnings in interface java.sql.ConnectiongetWarnings in class DelegatingConnectionjava.sql.SQLExceptionpublic int hashCode()
hashCode in class DelegatingConnectionpublic boolean equals(java.lang.Object obj)
DelegatingConnectionequals in class DelegatingConnectionpublic boolean isReadOnly()
throws java.sql.SQLException
isReadOnly in interface java.sql.ConnectionisReadOnly in class DelegatingConnectionjava.sql.SQLExceptionpublic java.lang.String nativeSQL(java.lang.String sql)
throws java.sql.SQLException
nativeSQL in interface java.sql.ConnectionnativeSQL in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String sql)
throws java.sql.SQLException
prepareCall in interface java.sql.ConnectionprepareCall in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareCall in interface java.sql.ConnectionprepareCall in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
prepareStatement in interface java.sql.ConnectionprepareStatement in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareStatement in interface java.sql.ConnectionprepareStatement in class DelegatingConnectionjava.sql.SQLExceptionpublic void rollback()
throws java.sql.SQLException
rollback in interface java.sql.Connectionrollback in class DelegatingConnectionjava.sql.SQLExceptionpublic void setAutoCommit(boolean autoCommit)
throws java.sql.SQLException
setAutoCommit in interface java.sql.ConnectionsetAutoCommit in class DelegatingConnectionjava.sql.SQLExceptionpublic void setCatalog(java.lang.String catalog)
throws java.sql.SQLException
setCatalog in interface java.sql.ConnectionsetCatalog in class DelegatingConnectionjava.sql.SQLExceptionpublic void setReadOnly(boolean readOnly)
throws java.sql.SQLException
setReadOnly in interface java.sql.ConnectionsetReadOnly in class DelegatingConnectionjava.sql.SQLExceptionpublic void setTransactionIsolation(int level)
throws java.sql.SQLException
setTransactionIsolation in interface java.sql.ConnectionsetTransactionIsolation in class DelegatingConnectionjava.sql.SQLExceptionpublic void setTypeMap(java.util.Map map)
throws java.sql.SQLException
setTypeMap in interface java.sql.ConnectionsetTypeMap in class DelegatingConnectionjava.sql.SQLExceptionpublic java.lang.String toString()
DelegatingConnectiontoString in class DelegatingConnectionpublic int getHoldability()
throws java.sql.SQLException
getHoldability in interface java.sql.ConnectiongetHoldability in class DelegatingConnectionjava.sql.SQLExceptionpublic void setHoldability(int holdability)
throws java.sql.SQLException
setHoldability in interface java.sql.ConnectionsetHoldability in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.Savepoint setSavepoint()
throws java.sql.SQLException
setSavepoint in interface java.sql.ConnectionsetSavepoint in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.Savepoint setSavepoint(java.lang.String name)
throws java.sql.SQLException
setSavepoint in interface java.sql.ConnectionsetSavepoint in class DelegatingConnectionjava.sql.SQLExceptionpublic void releaseSavepoint(java.sql.Savepoint savepoint)
throws java.sql.SQLException
releaseSavepoint in interface java.sql.ConnectionreleaseSavepoint in class DelegatingConnectionjava.sql.SQLExceptionpublic void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
rollback in interface java.sql.Connectionrollback in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
createStatement in interface java.sql.ConnectioncreateStatement in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareCall in interface java.sql.ConnectionprepareCall in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
prepareStatement in interface java.sql.ConnectionprepareStatement in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareStatement in interface java.sql.ConnectionprepareStatement in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
prepareStatement in interface java.sql.ConnectionprepareStatement in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
prepareStatement in interface java.sql.ConnectionprepareStatement in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.Connection getDelegate()
DelegatingConnectionConnection.getDelegate in class DelegatingConnectionConnection.DelegatingConnection.getDelegate()public java.sql.Connection getInnermostDelegate()
DelegatingConnectionConnection is not a
DelegatingConnection, returns it,
otherwise recursively invokes this method on
my delegate.
Hence this method will return the first delegate that is not a DelegatingConnection, or null when no non-DelegatingConnection delegate can be found by traversing this chain.
This method is useful when you may have nested
DelegatingConnections, and you want to make
sure to obtain a "genuine" Connection.
getInnermostDelegate in class DelegatingConnectionDelegatingConnection.getInnermostDelegate()