public SubordinateAtomicAction (int timeout, Xid xid) { super(timeout); // implicit start (done in base class) _theXid = new XidImple(xid); _activated = true; }
public ServerTransaction (Uid actUid, Xid xid) { super(actUid, null); // convert to internal format (makes saving/restoring easier) _theXid = new XidImple(xid); }
public boolean contains (Xid xid) { XidImple xidImple = new XidImple(xid); return _whenFirstSeen.containsKey(xidImple); }
public boolean contains (Xid xid) { XidImple xidImple = new XidImple(xid); return _whenFirstSeen.containsKey(xidImple); }
private static final XID getXIDfromXid(Xid xid) { XidImple xidImple; if(xid instanceof XidImple) { xidImple = (XidImple)xid; } else { xidImple = new XidImple(xid); } return xidImple.getXID(); }
public final Xid getTxId () { Xid res = baseXid(); if (res == null) res = new XidImple(_theTransaction); return res; }
public final Xid getTxId () { Xid res = baseXid(); if (res == null) res = new XidImple(_theTransaction); return res; }
public static String getNodeName(XID xid) { if (xid == null || !FormatConstants.isNarayanaFormatId(xid.formatID)) { return null; } Xid xidImple = new XidImple(xid); byte[] globalTransactionId = xidImple.getGlobalTransactionId(); // the node name follows the Uid with no separator, so the only // way to tell where it starts is to figure out how long the Uid is. int offset = Uid.UID_SIZE; return new String(Arrays.copyOfRange(globalTransactionId, offset, globalTransactionId.length), StandardCharsets.UTF_8); }
public static final String getXANodeName (Xid xid) { XidImple xidImple; if(xid instanceof XidImple) { xidImple = (XidImple)xid; } else { xidImple = new XidImple(xid); } return XATxConverter.getNodeName(xidImple.getXID()); }
private XidImple convertXid(Xid xid) { if (xid != null && xid.getFormatId() == XATxConverter.FORMAT_ID) { XidImple toImport = new XidImple(xid); XATxConverter.setSubordinateNodeName(toImport.getXID(), TxControl.getXANodeName()); return new SubordinateXidImple(toImport); } else { return new XidImple(xid); } }
protected HeaderState unpackHeader(InputObjectState os) throws IOException { wasInvoked = true; if (os.unpackBoolean()) new XidImple().unpackFrom(os); return super.unpackHeader(os); }
public static Xid getXid (Uid uid, boolean branch, int formatId) throws IllegalStateException { XID xid; if (branch) xid = getXid(uid, new Uid(), formatId, null); else xid = getXid(uid, Uid.nullUid(), formatId, null); return new XidImple(xid); }
public Transaction getTransaction(Xid xid) throws XAException { // first see if the xid is a root coordinator Transaction transaction = TransactionImple.getTransaction(new XidImple(xid).getTransactionUid()); // second see if the xid is a subordinate txn if(transaction == null) { transaction = SubordinationManager.getTransactionImporter().getImportedTransaction(xid); } return transaction; }
private void init() { jndiName = getUid().stringForm(); className = "unavailable"; eisProductName = "unavailable"; eisProductVersion = "unavailable"; timeout = 0; heuristic = -1; xidImple = new XidImple(new XID()); }
private void init() { jndiName = getUid().stringForm(); className = "unavailable"; eisProductName = "unavailable"; eisProductVersion = "unavailable"; timeout = 0; heuristic = -1; xidImple = new XidImple(new XID()); }
public static Xid getXid (Uid uid, boolean branch, int formatId) throws IllegalStateException { XID xid; if (branch) xid = getXid(uid, new Uid(), formatId, null); else xid = getXid(uid, Uid.nullUid(), formatId, null); return new XidImple(xid); }
public static Xid getXid (Uid uid, boolean branch, int formatId) throws IllegalStateException { XID xid; if (branch) xid = getXid(uid, new Uid(), formatId, null); else xid = getXid(uid, Uid.nullUid(), formatId, null); return new XidImple(xid); }
public Transaction getTransaction(Xid xid) throws XAException { // first see if the xid is a root coordinator Transaction transaction = TransactionImple.getTransaction(new XidImple(xid).getTransactionUid()); // second see if the xid is a subordinate txn if(transaction == null) { transaction = SubordinationManager.getTransactionImporter().getImportedTransaction(xid); } return transaction; }
private void init() { jndiName = getUid().stringForm(); className = "unavailable"; eisProductName = "unavailable"; eisProductVersion = "unavailable"; timeout = 0; heuristic = -1; xidImple = new XidImple(new XID()); }
public XAResourceRecordBean(UidWrapper w) { super(w.getUid()); init(); xares = new JTAXAResourceRecordWrapper(w.getUid()); xidImple = new XidImple(new XID()); heuristic = -1; }