public boolean restoreState(InputObjectState os) { InputObjectState copy = new InputObjectState(os); try { heuristic = copy.unpackInt(); committed = copy.unpackBoolean(); xidImple = new XidImple(XidImple.unpack(copy)); return super.restoreState(os); } catch (IOException e) { return false; } }
@Test public void testPackUnpack () throws Exception { XidImple xid1 = new XidImple(new Uid()); OutputObjectState os = new OutputObjectState(); assertTrue(xid1.packInto(os)); InputObjectState is = new InputObjectState(os); XidImple xid2 = new XidImple(); assertTrue(xid2.unpackFrom(is)); assertTrue(xid1.equals(xid2)); os = new OutputObjectState(); XidImple.pack(os, xid1); is = new InputObjectState(os); xid2 = (XidImple) XidImple.unpack(is); assertTrue(xid1.equals(xid2)); } }
tsLogger.logger.trace("unpack: " + commitMarkableJndiName); xid = XidImple.unpack(os); if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("unpack: " + xid);
tsLogger.logger.trace("unpack: " + commitMarkableJndiName); xid = XidImple.unpack(os); if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("unpack: " + xid);
tsLogger.logger.trace("unpack: " + commitMarkableJndiName); xid = XidImple.unpack(os); if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("unpack: " + xid);
tsLogger.logger.trace("unpack: " + commitMarkableJndiName); xid = XidImple.unpack(os); if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("unpack: " + xid);
tsLogger.logger.trace("unpack: " + commitMarkableJndiName); xid = XidImple.unpack(os); if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("unpack: " + xid);
throws IOException XidImple.unpack(is) ; final int recoveryType = is.unpackInt() ; switch(recoveryType)
throws IOException XidImple.unpack(is) ; final int recoveryType = is.unpackInt() ; switch(recoveryType)
throws IOException XidImple.unpack(is) ; final int recoveryType = is.unpackInt() ; switch(recoveryType)
throws IOException XidImple.unpack(is) ; final int recoveryType = is.unpackInt() ; switch(recoveryType)
throws IOException XidImple.unpack(is) ; final int recoveryType = is.unpackInt() ; switch(recoveryType)
throws IOException XidImple.unpack(is) ; final int recoveryType = is.unpackInt() ; switch(recoveryType)
throws IOException XidImple.unpack(is) ; final int recoveryType = is.unpackInt() ; switch(recoveryType)
public RecoverConnectableAtomicAction(String type, Uid rcvUid, InputObjectState os) throws ObjectStoreException, IOException { super(rcvUid); this.recoveringAs = type; // Unpack BasicAction::save_state preamble Header hdr = new Header(); unpackHeader(os, hdr); os.unpackBoolean(); // FYI pastFirstParticipant // Take a look at the first record type int record_type = os.unpackInt(); if (record_type == RecordType.COMMITMARKABLERESOURCE) { // Its one we are interested in jndiName = os.unpackString(); xid = XidImple.unpack(os); hasCompleted = os.unpackBoolean(); } }
_committed = os.unpackBoolean(); _tranID = XidImple.unpack(os);
public RecoverConnectableAtomicAction(String type, Uid rcvUid, InputObjectState os) throws ObjectStoreException, IOException { super(rcvUid); this.recoveringAs = type; // Unpack BasicAction::save_state preamble Header hdr = new Header(); unpackHeader(os, hdr); os.unpackBoolean(); // FYI pastFirstParticipant // Take a look at the first record type int record_type = os.unpackInt(); if (record_type == RecordType.COMMITMARKABLERESOURCE) { // Its one we are interested in jndiName = os.unpackString(); xid = XidImple.unpack(os); hasCompleted = os.unpackBoolean(); if (hasCompleted) { wasCommitted = os.unpackBoolean(); } } }
public RecoverConnectableAtomicAction(String type, Uid rcvUid, InputObjectState os) throws ObjectStoreException, IOException { super(rcvUid); this.recoveringAs = type; // Unpack BasicAction::save_state preamble Header hdr = new Header(); unpackHeader(os, hdr); os.unpackBoolean(); // FYI pastFirstParticipant // Take a look at the first record type int record_type = os.unpackInt(); if (record_type == RecordType.COMMITMARKABLERESOURCE) { // Its one we are interested in jndiName = os.unpackString(); xid = XidImple.unpack(os); hasCompleted = os.unpackBoolean(); if (hasCompleted) { wasCommitted = os.unpackBoolean(); } } }
public RecoverConnectableAtomicAction(String type, Uid rcvUid, InputObjectState os) throws ObjectStoreException, IOException { super(rcvUid); this.recoveringAs = type; // Unpack BasicAction::save_state preamble Header hdr = new Header(); unpackHeader(os, hdr); os.unpackBoolean(); // FYI pastFirstParticipant // Take a look at the first record type int record_type = os.unpackInt(); if (record_type == RecordType.COMMITMARKABLERESOURCE) { // Its one we are interested in jndiName = os.unpackString(); xid = XidImple.unpack(os); hasCompleted = os.unpackBoolean(); if (hasCompleted) { wasCommitted = os.unpackBoolean(); } } }
public RecoverConnectableAtomicAction(String type, Uid rcvUid, InputObjectState os) throws ObjectStoreException, IOException { super(rcvUid); this.recoveringAs = type; // Unpack BasicAction::save_state preamble Header hdr = new Header(); unpackHeader(os, hdr); os.unpackBoolean(); // FYI pastFirstParticipant // Take a look at the first record type int record_type = os.unpackInt(); if (record_type == RecordType.COMMITMARKABLERESOURCE) { // Its one we are interested in jndiName = os.unpackString(); xid = XidImple.unpack(os); hasCompleted = os.unpackBoolean(); if (hasCompleted) { wasCommitted = os.unpackBoolean(); } } }