public class JDBCXAConnection extends JDBCPooledConnection implements XAConnection
Each instance has an JDBCXAResource inherits the superclass's two JDBCConnection objects, one for internal access, and one for user access.
The getConnection() method returns a user connection and links this with the JDBCXAResource. This puts the object in the inUse state. When the user connection is closed, the object is put in the free state.
XAConnection| Constructor and Description |
|---|
JDBCXAConnection(JDBCXADataSource dataSource,
JDBCConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Connection |
getConnection()
Returns a connection that can be used by the user application.
|
XAResource |
getXAResource() |
addConnectionEventListener, addStatementEventListener, connectionClosed, connectionErrorOccurred, isInUse, release, removeConnectionEventListener, removeStatementEventListener, resetequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddConnectionEventListener, addStatementEventListener, removeConnectionEventListener, removeStatementEventListenerpublic JDBCXAConnection(JDBCXADataSource dataSource, JDBCConnection connection)
public XAResource getXAResource() throws SQLException
getXAResource in interface XAConnectionSQLExceptionpublic Connection getConnection() throws SQLException
getConnection in interface PooledConnectiongetConnection in class JDBCPooledConnectionSQLException - if a lease has already been given on this connectionpublic void close()
throws SQLException
close in interface PooledConnectionclose in class JDBCPooledConnectionSQLExceptionCopyright © 2001 - 2017 HSQL Development Group.