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, reset
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addConnectionEventListener, addStatementEventListener, removeConnectionEventListener, removeStatementEventListener
public JDBCXAConnection(JDBCXADataSource dataSource, JDBCConnection connection)
public XAResource getXAResource() throws SQLException
getXAResource
in interface XAConnection
SQLException
public Connection getConnection() throws SQLException
getConnection
in interface PooledConnection
getConnection
in class JDBCPooledConnection
SQLException
- if a lease has already been given on this connectionpublic void close() throws SQLException
close
in interface PooledConnection
close
in class JDBCPooledConnection
SQLException
Copyright © 2001 - 2017 HSQL Development Group.