|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.codehaus.activemq.message.ActiveMQXid
A ActiveMQXid object holds the distributed
transaction id that is passed around in an ActiveMQ system.
Eventhough a Transaction Manager (TM) has his own Xid implementation that he uses when he talks to the our ActiveMQXAResource, we need to send the Xid data down to the server in our format.
ActiveMQ uses Strings as the transaction id. This class coverts an Xid to and from a string.
Xid,
Serialized Form| Field Summary |
| Fields inherited from interface javax.transaction.xa.Xid |
MAXBQUALSIZE, MAXGTRIDSIZE |
| Constructor Summary | |
ActiveMQXid()
This constructor is only used for serialization |
|
ActiveMQXid(int formatId,
byte[] branchQualifier,
byte[] globalTransactionId)
|
|
ActiveMQXid(String txid)
Creates a new ActiveMQXid object. |
|
ActiveMQXid(Xid xid)
Creates a new ActiveMQXid object with the Xid data contained in xid |
|
| Method Summary | |
protected int |
compareTo(byte[] left,
byte[] right)
|
int |
compareTo(Object object)
|
static boolean |
equals(byte[] left,
byte[] right)
|
boolean |
equals(Object that)
|
static boolean |
equals(Xid tis,
Xid that)
Test for equivlance between two Xid |
static ActiveMQXid |
fromBytes(byte[] data)
Deserializes the data into an Xid |
byte[] |
getBranchQualifier()
|
int |
getFormatId()
|
byte[] |
getGlobalTransactionId()
|
protected int |
hash(byte[] bytes,
int hash)
|
int |
hashCode()
|
static ActiveMQXid |
read(DataInput dataIn)
Reads the Xid from a stream |
protected static byte[] |
readBytes(DataInput dataIn)
|
void |
readExternal(ObjectInput in)
|
void |
readState(DataInput dataIn)
|
byte[] |
toBytes()
|
String |
toLocalTransactionId()
|
String |
toString()
|
void |
write(DataOutput dataOut)
Writes the Xid to a stream |
protected void |
writeBytes(DataOutput dataOut,
byte[] data)
|
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ActiveMQXid()
public ActiveMQXid(Xid xid)
xid
public ActiveMQXid(int formatId,
byte[] branchQualifier,
byte[] globalTransactionId)
public ActiveMQXid(String txid)
throws JMSException
| Method Detail |
public static ActiveMQXid fromBytes(byte[] data)
throws IOException
data -
IOExceptionpublic int hashCode()
public boolean equals(Object that)
public static boolean equals(Xid tis,
Xid that)
tis - that -
public int compareTo(Object object)
compareTo in interface Comparablepublic String toLocalTransactionId()
public byte[] getBranchQualifier()
getBranchQualifier in interface XidXid.getBranchQualifier()public int getFormatId()
getFormatId in interface XidXid.getFormatId()public byte[] getGlobalTransactionId()
getGlobalTransactionId in interface XidXid.getGlobalTransactionId()public String toString()
Object.toString()
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOException
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException
public void readState(DataInput dataIn)
throws IOException
IOException
public static ActiveMQXid read(DataInput dataIn)
throws IOException
dataIn -
IOException
public byte[] toBytes()
throws IOException
IOException
public void write(DataOutput dataOut)
throws IOException
dataOut -
IOException
protected void writeBytes(DataOutput dataOut,
byte[] data)
throws IOException
IOException
protected static byte[] readBytes(DataInput dataIn)
throws IOException
IOException
public static boolean equals(byte[] left,
byte[] right)
protected int compareTo(byte[] left,
byte[] right)
protected int hash(byte[] bytes,
int hash)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||