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, reset
public JDBCXAConnection(JDBCXADataSource dataSource, JDBCConnection connection)
public javax.transaction.xa.XAResource getXAResource() throws java.sql.SQLException
getXAResource
in interface javax.sql.XAConnection
java.sql.SQLException
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.PooledConnection
getConnection
in class JDBCPooledConnection
java.sql.SQLException
- if a lease has already been given on this connectionpublic void close() throws java.sql.SQLException
close
in interface javax.sql.PooledConnection
close
in class JDBCPooledConnection
java.sql.SQLException
Copyright �� 2001 - 2017 HSQL Development Group.