tyrex.resource.jdbc.xa
public final class XAConnectionImpl extends Object implements XAConnection, XAResource
If the transaction is managed through the JDBC interface, this connection will reference the underlying JDBC connection directly. If this resource is enlisted with a global transaction through the XAResource interface, it will reference a transactional connection, or TxConnection. Such a connection may be shared by two or more XA connections enlisted with the same transaction.
Version: 1.0
See Also: ClientConnection ConnectionEventListener TxConnection
Field Summary | |
---|---|
Connection | _underlying
This is the underlying JDBC connection represented
by this pooled connection. |
Constructor Summary | |
---|---|
XAConnectionImpl(XADataSourceImpl resManager, Connection underlying, String userName, String password)
Construct a new XA/pooled connection with the underlying JDBC
connection suitable for this driver only. |
Method Summary | |
---|---|
void | addConnectionEventListener(ConnectionEventListener listener) |
void | close() |
void | commit(Xid xid, boolean onePhase) |
void | end(Xid xid, int flags) |
protected void | finalize() |
void | forget(Xid xid) |
Connection | getConnection() |
int | getTransactionTimeout() |
Connection | getUnderlying(int clientId)
Called to obtain the underlying connections. |
XAResource | getXAResource() |
boolean | insideGlobalTx()
Returns true if this connection is inside a global transaction.
|
boolean | isSameRM(XAResource xaRes) |
void | notifyClose(int clientId)
Called by ClientConnection to notify that the application
has attempted to close the connection. |
void | notifyError(int clientId, SQLException except)
Called by ClientConnection to notify that an error
occured with the underlying connection. |
int | prepare(Xid xid) |
Xid[] | recover(int flags) |
void | removeConnectionEventListener(ConnectionEventListener listener) |
void | rollback(Xid xid) |
boolean | setTransactionTimeout(int seconds) |
void | start(Xid xid, int flags) |
String | toString() |
Parameters: resManager the resource manager for the underlying connections underlying the underlying connection. Can be null. userName the user name for the underlying connection. Can be null. password the password for the underlying connection. Can be null.
Parameters: clientId The ClientConnection identifier
Parameters: clientId The ClientConnection identifier
Parameters: clientId The ClientConnection identifier except The exception raised by the underlying connection