tyrex.resource.jdbc.xa
Class TxConnection

java.lang.Object
  extended bytyrex.resource.jdbc.xa.TxConnection

final class TxConnection
extends java.lang.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
(package private)  java.sql.Connection conn
          Holds the underlying JDBC connection for as long as this connection is useable.
(package private)  int count
          Reference counter indicates how many XA connections share this underlying connection and transaction.
(package private)  java.lang.String password
          The password for the underlying connection.
(package private)  boolean prepared
          True if the transaction has already been prepared.
(package private)  boolean readOnly
          True if the transaction has been prepared and found out to be read-only.
(package private)  long started
          Indicates the clock time (in ms) when the transaction started.
(package private)  boolean timedOut
          True if the transaction has failed due to time out.
(package private)  long timeout
          Indicates the clock time (in ms) when the transaction should time out.
(package private)  java.lang.String userName
          The user name for the underlying connection.
(package private)  javax.transaction.xa.Xid xid
          The Xid of the transactions.
 
Constructor Summary
(package private) TxConnection()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xid

javax.transaction.xa.Xid xid
The Xid of the transactions. Connections that are not associated with a transaction are not represented here.


conn

java.sql.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.


userName

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


password

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


timeout

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


started

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


count

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


timedOut

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


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.

Constructor Detail

TxConnection

TxConnection()


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.