org.objectweb.jotm
Class JavaXidImpl

java.lang.Object
  extended by org.objectweb.jotm.JavaXidImpl
All Implemented Interfaces:
java.io.Serializable, javax.transaction.xa.Xid

public class JavaXidImpl
extends java.lang.Object
implements javax.transaction.xa.Xid, java.io.Serializable

Xid implementation for JTA XID has the following format as defined by X/Open Specification: XID long formatId format identifier long gtrid_length value 1-64 long bqual_length value 1-64 byte data [XIDDATASIZE] where XIDDATASIZE = 128 The data field comprises at most two contiguous components: a global transaction identifier (gtrid) and a branch qualifier (bqual) which are defined as: byte gtrid [1-64] global transaction identfier byte bqual [1-64] branch qualifier

See Also:
Serialized Form

Field Summary
static int JOTM_FORMAT_ID
           
 
Fields inherited from interface javax.transaction.xa.Xid
MAXBQUALSIZE, MAXGTRIDSIZE
 
Constructor Summary
JavaXidImpl(Xid jotmXid)
          Build an javax.transaction.xa.Xid from the org.objectweb.jotm.Xid
 
Method Summary
 boolean equals(java.lang.Object obj2)
          return true if objects are identical
 byte[] getBranchQualifier()
          Get the Branch Qualifier for that Xid
 int getFormatId()
          Get the format id for that Xid
 byte[] getGlobalTransactionId()
          Get the Global Id for that Xid
 int hashCode()
          return a hashcode value for this object
 java.lang.String toString()
          String form default toString() compresses Xid's
 java.lang.String toString(boolean Full)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

JOTM_FORMAT_ID

public static final int JOTM_FORMAT_ID
See Also:
Constant Field Values
Constructor Detail

JavaXidImpl

public JavaXidImpl(Xid jotmXid)
Build an javax.transaction.xa.Xid from the org.objectweb.jotm.Xid

Method Detail

getFormatId

public int getFormatId()
Get the format id for that Xid

Specified by:
getFormatId in interface javax.transaction.xa.Xid

getGlobalTransactionId

public byte[] getGlobalTransactionId()
Get the Global Id for that Xid

Specified by:
getGlobalTransactionId in interface javax.transaction.xa.Xid

getBranchQualifier

public byte[] getBranchQualifier()
Get the Branch Qualifier for that Xid

Specified by:
getBranchQualifier in interface javax.transaction.xa.Xid

toString

public java.lang.String toString()
String form default toString() compresses Xid's

Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(boolean Full)

equals

public boolean equals(java.lang.Object obj2)
return true if objects are identical

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
return a hashcode value for this object

Overrides:
hashCode in class java.lang.Object