public final class ConnectionHandler extends Object implements TransactionAware, Acquirable
| Modifier and Type | Class and Description |
|---|---|
static class |
ConnectionHandler.DirtyAttribute |
static class |
ConnectionHandler.State |
TransactionAware.SQLCallable<T>| Constructor and Description |
|---|
ConnectionHandler(XAConnection xa,
Pool pool) |
public ConnectionHandler(XAConnection xa, Pool pool) throws SQLException
SQLExceptionpublic ConnectionWrapper connectionWrapper()
public ConnectionWrapper detachedWrapper()
public void onConnectionWrapperClose(ConnectionWrapper wrapper, ConnectionWrapper.JdbcResourcesLeakReport leakReport) throws SQLException
SQLExceptionpublic Connection rawConnection()
public XAResource getXaResource()
public void resetConnection()
throws SQLException
SQLExceptionpublic void closeConnection()
throws SQLException
SQLExceptionpublic boolean acquire()
acquire in interface Acquirablepublic boolean isAcquirable()
isAcquirable in interface Acquirablepublic boolean setState(ConnectionHandler.State expected, ConnectionHandler.State newState)
public void setState(ConnectionHandler.State newState)
public void touch()
public boolean isLeak(Duration timeout)
public boolean isIdle(Duration timeout)
public void setMaxLifetimeTask(Future<?> maxLifetimeTask)
public boolean isValid()
public Thread getHoldingThread()
public void setHoldingThread(Thread holdingThread)
public void traceConnectionOperation(String operation)
public List<String> getConnectionOperations()
public StackTraceElement[] getAcquisitionStackTrace()
public void setAcquisitionStackTrace(StackTraceElement[] stackTrace)
public StackTraceElement[] getLastOperationStackTrace()
public void setDirtyAttribute(ConnectionHandler.DirtyAttribute attribute)
public boolean isEnlisted()
public Connection getConnection()
getConnection in interface TransactionAwarepublic void transactionStart()
throws SQLException
transactionStart in interface TransactionAwareSQLExceptionpublic void transactionBeforeCompletion(boolean successful)
transactionBeforeCompletion in interface TransactionAwarepublic void transactionCommit()
throws SQLException
transactionCommit in interface TransactionAwareSQLExceptionpublic void transactionRollback()
throws SQLException
transactionRollback in interface TransactionAwareSQLExceptionpublic void transactionEnd()
throws SQLException
transactionEnd in interface TransactionAwareSQLExceptionpublic void transactionCheckCallback(TransactionAware.SQLCallable<Boolean> transactionCheck)
transactionCheckCallback in interface TransactionAwarepublic void verifyEnlistment()
throws SQLException
SQLExceptionpublic void setFlushOnly()
setFlushOnly in interface TransactionAwarepublic void setFlushOnly(SQLException se)
Copyright © 2023 JBoss by Red Hat. All rights reserved.