public class JtdsXAConnection extends PooledConnection implements javax.sql.XAConnection
XAConnection
interface.Modifier and Type | Field and Description |
---|---|
private JtdsDataSource |
dataSource |
private javax.transaction.xa.XAResource |
resource
The XAResource used by the transaction manager to control this connection.
|
private int |
xaConnectionId |
connection
Constructor and Description |
---|
JtdsXAConnection(JtdsDataSource dataSource,
java.sql.Connection connection)
Construct a new
XAConnection object. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the database connection.
|
(package private) int |
getXAConnectionID()
Retrieves the XA Connection ID to pass to server.
|
protected JtdsDataSource |
getXADataSource() |
javax.transaction.xa.XAResource |
getXAResource() |
addConnectionEventListener, addStatementEventListener, fireConnectionEvent, getConnection, removeConnectionEventListener, removeStatementEventListener
private final javax.transaction.xa.XAResource resource
private final JtdsDataSource dataSource
private final int xaConnectionId
public JtdsXAConnection(JtdsDataSource dataSource, java.sql.Connection connection) throws java.sql.SQLException
XAConnection
object.dataSource
- the parent DataSource
objectconnection
- the real database connectionjava.sql.SQLException
int getXAConnectionID()
Integer
public javax.transaction.xa.XAResource getXAResource() throws java.sql.SQLException
getXAResource
in interface javax.sql.XAConnection
java.sql.SQLException
public void close() throws java.sql.SQLException
PooledConnection
close
in interface javax.sql.PooledConnection
close
in class PooledConnection
java.sql.SQLException
- if an error occursprotected JtdsDataSource getXADataSource()
Generated on June 8 2013