Package net.sourceforge.jtds.jdbcx
Class JtdsXAConnection
java.lang.Object
net.sourceforge.jtds.jdbcx.PooledConnection
net.sourceforge.jtds.jdbcx.JtdsXAConnection
- All Implemented Interfaces:
PooledConnection,XAConnection
jTDS implementation of the
XAConnection interface.- Version:
- $Id: JtdsXAConnection.java,v 1.4 2005-04-28 14:29:30 alin_sinpalean Exp $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JtdsDataSourceprivate final XAResourceThe XAResource used by the transaction manager to control this connection.private final intFields inherited from class net.sourceforge.jtds.jdbcx.PooledConnection
connection -
Constructor Summary
ConstructorsConstructorDescriptionJtdsXAConnection(JtdsDataSource dataSource, Connection connection) Construct a newXAConnectionobject. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the database connection.(package private) intRetrieves the XA Connection ID to pass to server.protected JtdsDataSourceMethods inherited from class net.sourceforge.jtds.jdbcx.PooledConnection
addConnectionEventListener, addStatementEventListener, fireConnectionEvent, getConnection, removeConnectionEventListener, removeStatementEventListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.sql.PooledConnection
addConnectionEventListener, addStatementEventListener, getConnection, removeConnectionEventListener, removeStatementEventListener
-
Field Details
-
resource
The XAResource used by the transaction manager to control this connection. -
dataSource
-
xaConnectionId
private final int xaConnectionId
-
-
Constructor Details
-
JtdsXAConnection
Construct a newXAConnectionobject.- Parameters:
dataSource- the parentDataSourceobjectconnection- the real database connection- Throws:
SQLException
-
-
Method Details
-
getXAConnectionID
int getXAConnectionID()Retrieves the XA Connection ID to pass to server.- Returns:
- the XA connection ID as an
Integer
-
getXAResource
- Specified by:
getXAResourcein interfaceXAConnection- Throws:
SQLException
-
close
Description copied from class:PooledConnectionCloses the database connection.- Specified by:
closein interfacePooledConnection- Overrides:
closein classPooledConnection- Throws:
SQLException- if an error occurs
-
getXADataSource
-