tyrex.resource.jdbc.xa

Class TxConnection

final class TxConnection extends Object

Describes an open connection associated with a transaction. When a transaction is opened for a connection, this record is created for the connection. It indicates the underlying JDBC connection and transaction Xid. Multiple XA connection that fall under the same transaction Xid will share the same TxConnection object.

Version: 1.0

Author: Assaf Arkin

See Also: Xid XAConnectionImpl

Field Summary
Connectionconn
Holds the underlying JDBC connection for as long as this connection is useable.
intcount
Reference counter indicates how many XA connections share this underlying connection and transaction.
Stringpassword
The password for the underlying connection.
booleanprepared
True if the transaction has already been prepared.
booleanreadOnly
True if the transaction has been prepared and found out to be read-only.
longstarted
Indicates the clock time (in ms) when the transaction started.
booleantimedOut
True if the transaction has failed due to time out.
longtimeout
Indicates the clock time (in ms) when the transaction should time out.
StringuserName
The user name for the underlying connection.
Xidxid
The Xid of the transactions.

Field Detail

conn

Connection conn
Holds the underlying JDBC connection for as long as this connection is useable. If the connection has been rolled back, timed out or had any other error, this variable will null and the connection is considered failed.

count

int count
Reference counter indicates how many XA connections share this underlying connection and transaction. Always one or more.

password

String password
The password for the underlying connection. Can be null.

prepared

boolean prepared
True if the transaction has already been prepared.

readOnly

boolean readOnly
True if the transaction has been prepared and found out to be read-only. Read-only transactions do not require commit/rollback.

started

long started
Indicates the clock time (in ms) when the transaction started.

timedOut

boolean timedOut
True if the transaction has failed due to time out.

timeout

long timeout
Indicates the clock time (in ms) when the transaction should time out. The transaction times out when System.currentTimeMillis() > timeout.

userName

String userName
The user name for the underlying connection. Can be null.

xid

Xid xid
The Xid of the transactions. Connections that are not associated with a transaction are not represented here.
Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.