public class ManagedConnection extends DelegatingConnection
| Modifier and Type | Class and Description |
|---|---|
protected class |
ManagedConnection.CompletionListener
Delegates to
transactionComplete()
for transaction completion events. |
_closed, _connTRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Constructor and Description |
|---|
ManagedConnection(ObjectPool pool,
TransactionRegistry transactionRegistry,
boolean accessToUnderlyingConnectionAllowed) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkOpen() |
void |
close() |
void |
commit() |
Connection |
getDelegate()
Returns my underlying
Connection. |
Connection |
getInnermostDelegate() |
boolean |
isAccessToUnderlyingConnectionAllowed()
If false, getDelegate() and getInnermostDelegate() will return null.
|
void |
rollback() |
void |
setAutoCommit(boolean autoCommit) |
void |
setReadOnly(boolean readOnly) |
protected void |
transactionComplete() |
abort, activate, clearWarnings, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, equals, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getDelegateInternal, getHoldability, getInnermostDelegateInternal, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, handleException, hashCode, innermostDelegateEquals, isClosed, isReadOnly, isValid, isWrapperFor, nativeSQL, passivate, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setCatalog, setClientInfo, setClientInfo, setDelegate, setHoldability, setNetworkTimeout, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap, toString, unwrapaddTrace, clearTrace, getConfig, getLastUsed, getTrace, printStackTrace, removeTrace, setLastUsed, setLastUsed, setStackTracepublic ManagedConnection(ObjectPool pool, TransactionRegistry transactionRegistry, boolean accessToUnderlyingConnectionAllowed) throws SQLException
SQLExceptionprotected void checkOpen()
throws SQLException
checkOpen in class DelegatingConnectionSQLExceptionpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface Connectionclose in class DelegatingConnectionSQLExceptionprotected void transactionComplete()
public void setAutoCommit(boolean autoCommit)
throws SQLException
setAutoCommit in interface ConnectionsetAutoCommit in class DelegatingConnectionSQLExceptionpublic void commit()
throws SQLException
commit in interface Connectioncommit in class DelegatingConnectionSQLExceptionpublic void rollback()
throws SQLException
rollback in interface Connectionrollback in class DelegatingConnectionSQLExceptionpublic void setReadOnly(boolean readOnly)
throws SQLException
setReadOnly in interface ConnectionsetReadOnly in class DelegatingConnectionSQLExceptionpublic boolean isAccessToUnderlyingConnectionAllowed()
public Connection getDelegate()
DelegatingConnectionConnection.getDelegate in class DelegatingConnectionConnection.public Connection getInnermostDelegate()
getInnermostDelegate in class DelegatingConnectionCopyright © 2015. All rights reserved.