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 JtdsDataSource
private final XAResource
The XAResource used by the transaction manager to control this connection.private final int
Fields inherited from class net.sourceforge.jtds.jdbcx.PooledConnection
connection
-
Constructor Summary
ConstructorsConstructorDescriptionJtdsXAConnection
(JtdsDataSource dataSource, Connection connection) Construct a newXAConnection
object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the database connection.(package private) int
Retrieves the XA Connection ID to pass to server.protected JtdsDataSource
Methods inherited from class net.sourceforge.jtds.jdbcx.PooledConnection
addConnectionEventListener, addStatementEventListener, fireConnectionEvent, getConnection, removeConnectionEventListener, removeStatementEventListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 newXAConnection
object.- Parameters:
dataSource
- the parentDataSource
objectconnection
- 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:
getXAResource
in interfaceXAConnection
- Throws:
SQLException
-
close
Description copied from class:PooledConnection
Closes the database connection.- Specified by:
close
in interfacePooledConnection
- Overrides:
close
in classPooledConnection
- Throws:
SQLException
- if an error occurs
-
getXADataSource
-