Package io.agroal.pool.util
Class XAConnectionAdaptor
- java.lang.Object
-
- io.agroal.pool.util.XAConnectionAdaptor
-
- All Implemented Interfaces:
PooledConnection,XAConnection
public class XAConnectionAdaptor extends Object implements XAConnection
Disguises a non-XA connection as an XAConnection. Useful to keep the same logic for pooling both XA and non-XA connections- Author:
- Luis Barreiro
-
-
Constructor Summary
Constructors Constructor Description XAConnectionAdaptor(Connection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConnectionEventListener(ConnectionEventListener listener)voidaddStatementEventListener(StatementEventListener listener)voidclose()ConnectiongetConnection()XAResourcegetXAResource()voidremoveConnectionEventListener(ConnectionEventListener listener)voidremoveStatementEventListener(StatementEventListener listener)
-
-
-
Constructor Detail
-
XAConnectionAdaptor
public XAConnectionAdaptor(Connection connection)
-
-
Method Detail
-
getConnection
public Connection getConnection()
- Specified by:
getConnectionin interfacePooledConnection
-
close
public void close() throws SQLException- Specified by:
closein interfacePooledConnection- Throws:
SQLException
-
addConnectionEventListener
public void addConnectionEventListener(ConnectionEventListener listener)
- Specified by:
addConnectionEventListenerin interfacePooledConnection
-
removeConnectionEventListener
public void removeConnectionEventListener(ConnectionEventListener listener)
- Specified by:
removeConnectionEventListenerin interfacePooledConnection
-
addStatementEventListener
public void addStatementEventListener(StatementEventListener listener)
- Specified by:
addStatementEventListenerin interfacePooledConnection
-
removeStatementEventListener
public void removeStatementEventListener(StatementEventListener listener)
- Specified by:
removeStatementEventListenerin interfacePooledConnection
-
getXAResource
public XAResource getXAResource() throws SQLException
- Specified by:
getXAResourcein interfaceXAConnection- Throws:
SQLException
-
-