1 46 47 package org.mr.api.jms; 48 49 import java.io.Serializable ; 50 51 import javax.transaction.xa.Xid ; 52 53 56 public class MantaXid implements Xid , Serializable { 57 58 private byte[] globalTransactionId; 59 private byte[] branchQualifier; 60 private int formatId; 61 62 public MantaXid(int formatId, 63 byte[] branchQualifier, 64 byte[] globalTransactionId) { 65 this.formatId = formatId; 66 this.branchQualifier = branchQualifier; 67 this.globalTransactionId = globalTransactionId; 68 } 69 70 public MantaXid(Xid xid) { 71 this.formatId = xid.getFormatId(); 72 this.branchQualifier = xid.getBranchQualifier(); 73 this.globalTransactionId = xid.getGlobalTransactionId(); 74 } 75 76 public int getFormatId() { 77 return formatId; 78 } 79 80 public byte[] getBranchQualifier() { 81 return branchQualifier; 82 } 83 84 public byte[] getGlobalTransactionId() { 85 return globalTransactionId; 86 } 87 88 } 89 | Popular Tags |