public final class ConnectionHandler extends Object implements TransactionAware
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
SQLException
public ConnectionWrapper newConnectionWrapper()
public ConnectionWrapper newDetachedConnectionWrapper()
public void onConnectionWrapperClose(ConnectionWrapper wrapper, ConnectionWrapper.JdbcResourcesLeakReport leakReport) throws SQLException
SQLException
public Connection getConnection()
getConnection
in interface TransactionAware
public XAResource getXaResource()
public void resetConnection() throws SQLException
SQLException
public void closeConnection() throws SQLException
SQLException
public 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 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 void transactionStart() throws SQLException
transactionStart
in interface TransactionAware
SQLException
public void transactionBeforeCompletion(boolean successful)
transactionBeforeCompletion
in interface TransactionAware
public void transactionCommit() throws SQLException
transactionCommit
in interface TransactionAware
SQLException
public void transactionRollback() throws SQLException
transactionRollback
in interface TransactionAware
SQLException
public void transactionEnd() throws SQLException
transactionEnd
in interface TransactionAware
SQLException
public void transactionCheckCallback(TransactionAware.SQLCallable<Boolean> transactionCheck)
transactionCheckCallback
in interface TransactionAware
public void verifyEnlistment() throws SQLException
SQLException
public void setFlushOnly()
setFlushOnly
in interface TransactionAware
public void setFlushOnly(SQLException se)
Copyright © 2021 JBoss by Red Hat. All rights reserved.