Class JDBCXAConnection
java.lang.Object
org.hsqldb.jdbc.pool.JDBCPooledConnection
org.hsqldb.jdbc.pool.JDBCXAConnection
- All Implemented Interfaces:
PooledConnection, XAConnection, JDBCConnectionEventListener
Subclass of JDBCPooledConnection implements the XAConnection interface.
For use by global transaction service managers.
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.
- Since:
- HSQLDB 2.0
- Author:
- Fred Toussi (fredt at users.sourceforge.net)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Returns a connection that can be used by the user application.Methods inherited from class JDBCPooledConnection
addConnectionEventListener, addStatementEventListener, connectionClosed, connectionErrorOccurred, isInUse, release, removeConnectionEventListener, removeStatementEventListener, resetMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PooledConnection
addConnectionEventListener, addStatementEventListener, removeConnectionEventListener, removeStatementEventListener
-
Constructor Details
-
JDBCXAConnection
-
-
Method Details
-
getXAResource
- Specified by:
getXAResourcein interfaceXAConnection- Throws:
SQLException
-
getConnection
Returns a connection that can be used by the user application.- Specified by:
getConnectionin interfacePooledConnection- Overrides:
getConnectionin classJDBCPooledConnection- Returns:
- Connection
- Throws:
SQLException- if a lease has already been given on this connection
-
close
- Specified by:
closein interfacePooledConnection- Overrides:
closein classJDBCPooledConnection- Throws:
SQLException
-