Refine search
protected HeaderState unpackHeader(InputObjectState os) throws IOException { boolean haveRecCoord = os.unpackBoolean(); if (haveRecCoord) os.unpackString(); // read ior return super.unpackHeader(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(); } } }
/** * Restore the state of the particpant from the specified input object stream. * * @param ios The Input object stream. * @return true if restored, false otherwise. * */ public boolean restoreState(InputObjectState ios) { try { id = ios.unpackString(); restoreEndpointReference(ios); recoveryStateValid = ios.unpackBoolean(); isParticipantCompletion = ios.unpackBoolean(); if (recoveryStateValid) { useSerialization = ios.unpackBoolean(); if (ios.unpackBoolean()) { recoveryState = ios.unpackBytes(); } else { recoveryState = null; } } } catch (XMLStreamException xmle) { WSTLogger.i18NLogger.warn_recovery_participant_ba_BAParticipantRecoveryRecord_restoreState_1(id, xmle); return false; } catch (IOException ioe) { WSTLogger.i18NLogger.warn_recovery_participant_ba_BAParticipantRecoveryRecord_restoreState_2(id, ioe); return false; } return true; }
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(); } } }
/** * Restore the state of the particpant from the specified input object stream. * * @param ios The Input object stream. * @return true if restored, false otherwise. * */ public boolean restoreState(InputObjectState ios) { try { id = ios.unpackString(); restoreEndpointReference(ios); recoveryStateValid = ios.unpackBoolean(); isParticipantCompletion = ios.unpackBoolean(); if (recoveryStateValid) { useSerialization = ios.unpackBoolean(); if (ios.unpackBoolean()) { recoveryState = ios.unpackBytes(); } else { recoveryState = null; } } } catch (XMLStreamException xmle) { WSTLogger.i18NLogger.warn_recovery_participant_ba_BAParticipantRecoveryRecord_restoreState_1(id, xmle); return false; } catch (IOException ioe) { WSTLogger.i18NLogger.warn_recovery_participant_ba_BAParticipantRecoveryRecord_restoreState_2(id, ioe); return false; } return true; }
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(); } } }
/** * Restore the state of the particpant from the specified input object stream. * * @param ios The Input object stream. * @return true if restored, false otherwise. * */ public boolean restoreState(InputObjectState ios) { try { id = ios.unpackString(); restoreEndpointReference(ios); recoveryStateValid = ios.unpackBoolean(); if (recoveryStateValid) { useSerialization = ios.unpackBoolean(); if (ios.unpackBoolean()) { recoveryState = ios.unpackBytes(); } else { recoveryState = null; } } } catch (XMLStreamException xmle) { WSTLogger.i18NLogger.warn_recovery_participant_at_ATParticipantRecoveryRecord_restoreState_1(id, xmle); return false; } catch (IOException ioe) { WSTLogger.i18NLogger.warn_recovery_participant_at_ATParticipantRecoveryRecord_restoreState_2(id, ioe); return false; } return true; }
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(); } }
public boolean restore_state(InputObjectState os, int t) { try { txId = os.unpackString(); prepared = os.unpackBoolean(); participantURI = os.unpackString(); coordinatorURI = os.unpackString(); recoveryURI = os.unpackString(); coordinatorID = os.unpackString(); status = TxStatus.fromStatus(os.unpackString()); terminateURI = os.unpackString(); commitURI = os.unpackString(); prepareURI = os.unpackString(); rollbackURI = os.unpackString(); commitOnePhaseURI = os.unpackString(); if (commitURI == null) { prepareURI = commitURI = rollbackURI = commitOnePhaseURI = terminateURI; } if (log.isInfoEnabled()) log.infof("restore_state %s", terminateURI); return super.restore_state(os, t); } catch (Exception e) { return false; } }
public boolean restore_state (InputObjectState os, int t) { boolean result = super.restore_state(os, t); if (result) { try { String resourcehandleImplClassName = os.unpackString(); Class clazz = ClassLoaderHelper.forName(ParticipantRecord.class, resourcehandleImplClassName); _resourceHandle = (Participant)clazz.newInstance(); result = _resourceHandle.restore_state(os); if (result) { _timeout = os.unpackLong(); _completed = os.unpackBoolean(); _exited = os.unpackBoolean(); if (_exited) { _failed = os.unpackBoolean(); } } } catch (Exception ex) { wscfLogger.i18NLogger.warn_model_sagas_coordinator_arjunacore_ParticipantRecord_14(ex); result = false; } } return result; }
public boolean restore_state (InputObjectState os, int t) { boolean result = super.restore_state(os, t); if (result) { try { String resourcehandleImplClassName = os.unpackString(); Class clazz = ClassLoaderHelper.forName(ParticipantRecord.class, resourcehandleImplClassName); _resourceHandle = (Participant)clazz.newInstance(); result = _resourceHandle.restore_state(os); if (result) { _timeout = os.unpackLong(); _completed = os.unpackBoolean(); _exited = os.unpackBoolean(); if (_exited) { _failed = os.unpackBoolean(); } } } catch (Exception ex) { wscfLogger.i18NLogger.warn_model_sagas_coordinator_arjunacore_ParticipantRecord_14(ex); result = false; } } return result; }
commitMarkableJndiName = os.unpackString(); if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("unpack: " + commitMarkableJndiName); if (os.unpackBoolean()) { committed = os.unpackBoolean(); productName = os.unpackString(); productVersion = os.unpackString(); res = super.restore_state(os, t); } catch (Exception e) {
commitMarkableJndiName = os.unpackString(); if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("unpack: " + commitMarkableJndiName); if (os.unpackBoolean()) { committed = os.unpackBoolean(); productName = os.unpackString(); productVersion = os.unpackString(); res = super.restore_state(os, t); } catch (Exception e) {
/** * Retrieve host/port pair from the Object Store. */ private boolean restore_state ( InputObjectState objstate ) { boolean ret_status = false ; try { _host = objstate.unpackString() ; _port = objstate.unpackInt() ; _markedDead = objstate.unpackBoolean() ; if ( _markedDead ) { long deadtime = objstate.unpackLong() ; _deadTime = new Date( deadtime ) ; } ret_status = true ; } catch ( IOException ex ) { tsLogger.i18NLogger.warn_recovery_TransactionStatusManagerItem_3(ex); } return ret_status ; }
/** * Retrieve host/port pair from the Object Store. */ private boolean restore_state ( InputObjectState objstate ) { boolean ret_status = false ; try { _host = objstate.unpackString() ; _port = objstate.unpackInt() ; _markedDead = objstate.unpackBoolean() ; if ( _markedDead ) { long deadtime = objstate.unpackLong() ; _deadTime = new Date( deadtime ) ; } ret_status = true ; } catch ( IOException ex ) { tsLogger.i18NLogger.warn_recovery_TransactionStatusManagerItem_3(ex); } return ret_status ; }
/** * Retrieve host/port pair from the Object Store. */ private boolean restore_state ( InputObjectState objstate ) { boolean ret_status = false ; try { _host = objstate.unpackString() ; _port = objstate.unpackInt() ; _markedDead = objstate.unpackBoolean() ; if ( _markedDead ) { long deadtime = objstate.unpackLong() ; _deadTime = new Date( deadtime ) ; } ret_status = true ; } catch ( IOException ex ) { tsLogger.i18NLogger.warn_recovery_TransactionStatusManagerItem_3(ex); } return ret_status ; }
/** * Retrieve host/port pair from the Object Store. */ private boolean restore_state ( InputObjectState objstate ) { boolean ret_status = false ; try { _host = objstate.unpackString() ; _port = objstate.unpackInt() ; _markedDead = objstate.unpackBoolean() ; if ( _markedDead ) { long deadtime = objstate.unpackLong() ; _deadTime = new Date( deadtime ) ; } ret_status = true ; } catch ( IOException ex ) { tsLogger.i18NLogger.warn_recovery_TransactionStatusManagerItem_3(ex); } return ret_status ; }
/** * Retrieve host/port pair from the Object Store. */ private boolean restore_state ( InputObjectState objstate ) { boolean ret_status = false ; try { _host = objstate.unpackString() ; _port = objstate.unpackInt() ; _markedDead = objstate.unpackBoolean() ; if ( _markedDead ) { long deadtime = objstate.unpackLong() ; _deadTime = new Date( deadtime ) ; } ret_status = true ; } catch ( IOException ex ) { tsLogger.i18NLogger.warn_recovery_TransactionStatusManagerItem_3(ex); } return ret_status ; }
/** * Restore the resource state. * @param is The input object stream. * @return The resource if successful, null otherwise. */ public static Object restore_state(final InputObjectState ios) { try { final boolean serializable = ios.unpackBoolean() ; if (serializable) { final ByteArrayInputStream bais = new ByteArrayInputStream(ios.unpackBytes()) ; final ObjectInputStream ois = new ObjectInputStream(bais) ; return ois.readObject() ; } else { final String className = ios.unpackString() ; final Class resourceClass = ClassLoaderHelper.forName(PersistableParticipantHelper.class, className) ; // returns Class not instance final Object resource = resourceClass.newInstance(); ((PersistableParticipant)resource).restoreState(ios) ; return resource ; } } catch (final Throwable th) { wstxLogger.i18NLogger.error_mwlabs_wst_util_PersistableParticipantHelper_3(th); return null; } }