public class JDBCXAConnection extends JDBCPooledConnection implements javax.sql.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() |
java.sql.Connection |
getConnection()
Returns a connection that can be used by the user application.
|
javax.transaction.xa.XAResource |
getXAResource() |
addConnectionEventListener, addStatementEventListener, connectionClosed, connectionErrorOccurred, isInUse, release, removeConnectionEventListener, removeStatementEventListener, resetpublic JDBCXAConnection(JDBCXADataSource dataSource, JDBCConnection connection)
public javax.transaction.xa.XAResource getXAResource()
throws java.sql.SQLException
getXAResource in interface javax.sql.XAConnectionjava.sql.SQLExceptionpublic java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.PooledConnectiongetConnection in class JDBCPooledConnectionjava.sql.SQLException - if a lease has already been given on this connectionpublic void close()
throws java.sql.SQLException
close in interface javax.sql.PooledConnectionclose in class JDBCPooledConnectionjava.sql.SQLExceptionCopyright © 2001 - 2018 HSQL Development Group.