org.exolab.jms.tranlog
Class ExternalXid
java.lang.Object
|
+--org.exolab.jms.tranlog.ExternalXid
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, javax.transaction.xa.Xid
- public final class ExternalXid
- extends java.lang.Object
- implements javax.transaction.xa.Xid, java.io.Externalizable
This class maps an external XID that is set in the transaction manager.
It needs to do this so that it can use it internally.
- Version:
- $Revision: 1.4 $ $Date: 2003/08/17 01:32:27 $
- Author:
- Jim Alateras
- See Also:
Xid
, Serialized Form
Field Summary |
protected static char[] |
HEX_DIGITS
Efficient mapping from 4 bit value to lower case hexadecimal digit. |
Fields inherited from interface javax.transaction.xa.Xid |
MAXBQUALSIZE, MAXGTRIDSIZE |
Constructor Summary |
ExternalXid()
Default constructor for Serialization |
ExternalXid(int formatId,
byte[] global,
byte[] branch)
Create an insrance of this class using the specified format id,
global transaction id and the branch qualifier. |
ExternalXid(javax.transaction.xa.Xid xid)
Create an instance of this class using the specified XID. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
HEX_DIGITS
protected static final char[] HEX_DIGITS
- Efficient mapping from 4 bit value to lower case hexadecimal digit.
gobbled from Tyrex imple
ExternalXid
public ExternalXid()
- Default constructor for Serialization
ExternalXid
public ExternalXid(javax.transaction.xa.Xid xid)
- Create an instance of this class using the specified XID. This
will always create a new instance and copy the format id, global
transaction id and branch qualifier id to the new instance
- Parameters:
xid
- - the xid to use
ExternalXid
public ExternalXid(int formatId,
byte[] global,
byte[] branch)
- Create an insrance of this class using the specified format id,
global transaction id and the branch qualifier.
- Parameters:
formatId
- - the format identifierglobal
- - the global transaction identifierbranch
- - the branch qualifier
getFormatId
public int getFormatId()
- Specified by:
getFormatId
in interface javax.transaction.xa.Xid
getGlobalTransactionId
public byte[] getGlobalTransactionId()
- Specified by:
getGlobalTransactionId
in interface javax.transaction.xa.Xid
getBranchQualifier
public byte[] getBranchQualifier()
- Specified by:
getBranchQualifier
in interface javax.transaction.xa.Xid
toString
public java.lang.String toString()
- Returns the global transaction identifier in the form of
exid://formatId.global.branch
- Overrides:
toString
in class java.lang.Object
- Returns:
- String
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
writeExternal
public void writeExternal(java.io.ObjectOutput stream)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
readExternal
public void readExternal(java.io.ObjectInput stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal
in interface java.io.Externalizable
Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.