@Override public String getHeuristicStatus() { return HeuristicStatus.intToStatus(xares.heuristic).name(); }
public int getXAErrorCode() { if (this.equals(HEURISTIC_ROLLBACK)) return XAException.XA_HEURRB; if (this.equals(HEURISTIC_COMMIT)) return XAException.XA_HEURCOM; if (this.equals(HEURISTIC_MIXED)) return XAException.XA_HEURMIX; if (this.equals(HEURISTIC_HAZARD)) return XAException.XA_HEURHAZ; return UNKNOWN_XA_ERROR_CODE; } }
public String setStatus(ParticipantStatus newState) { if (getListType().equals(newState)) return "participant is prepared for recovery"; /* * Only move a heuristic to the prepared list if it hasn't already committed or rolled back */ if (newState.equals(ParticipantStatus.PREPARED) && getListType().equals(ParticipantStatus.HEURISTIC)) { HeuristicStatus heuristicStatus = HeuristicStatus.valueOf(getHeuristicStatus()); if (heuristicStatus.equals(HeuristicStatus.HEURISTIC_COMMIT) || heuristicStatus.equals(HeuristicStatus.HEURISTIC_ROLLBACK)) { return "participant has already committed or rolled back"; } } if (parent != null && parent.setStatus(this, newState)) { listType = newState; if (newState == ParticipantStatus.PREPARED ) return "participant recovery will be attempted during the next recovery pass"; return "participant status change was successful"; } else { return "participant status change failed"; } }
public String getStatus() { if (isHeuristic()) { String type = getHeuristicStatus(); if (!type.equals(HeuristicStatus.UNKNOWN.name())) return type; } return listType.toString(); }
public String setStatus(ParticipantStatus newState) { if (getListType().equals(newState)) return "participant is prepared for recovery"; /* * Only move a heuristic to the prepared list if it hasn't already committed or rolled back */ if (newState.equals(ParticipantStatus.PREPARED) && getListType().equals(ParticipantStatus.HEURISTIC)) { HeuristicStatus heuristicStatus = HeuristicStatus.valueOf(getHeuristicStatus()); if (heuristicStatus.equals(HeuristicStatus.HEURISTIC_COMMIT) || heuristicStatus.equals(HeuristicStatus.HEURISTIC_ROLLBACK)) { return "participant has already committed or rolled back"; } } if (parent != null && parent.setStatus(this, newState)) { listType = newState; if (newState == ParticipantStatus.PREPARED ) return "participant recovery will be attempted during the next recovery pass"; return "participant status change was successful"; } else { return "participant status change failed"; } }
public String getStatus() { if (isHeuristic()) { String type = getHeuristicStatus(); if (!type.equals(HeuristicStatus.UNKNOWN.name())) return type; } return listType.toString(); }
@Override public String getHeuristicStatus() { return HeuristicStatus.intToStatus(xares.heuristic).name(); }
public String setStatus(ParticipantStatus newState) { if (getListType().equals(newState)) return "participant is prepared for recovery"; /* * Only move a heuristic to the prepared list if it hasn't already committed or rolled back */ if (newState.equals(ParticipantStatus.PREPARED) && getListType().equals(ParticipantStatus.HEURISTIC)) { HeuristicStatus heuristicStatus = HeuristicStatus.valueOf(getHeuristicStatus()); if (heuristicStatus.equals(HeuristicStatus.HEURISTIC_COMMIT) || heuristicStatus.equals(HeuristicStatus.HEURISTIC_ROLLBACK)) { return "participant has already committed or rolled back"; } } if (parent != null && parent.setStatus(this, newState)) { listType = newState; if (newState == ParticipantStatus.PREPARED ) return "participant recovery will be attempted during the next recovery pass"; return "participant status change was successful"; } else { return "participant status change failed"; } }
public String getStatus() { if (isHeuristic()) { String type = getHeuristicStatus(); if (!type.equals(HeuristicStatus.UNKNOWN.name())) return type; } return listType.toString(); }
public int getXAErrorCode() { if (this.equals(HEURISTIC_ROLLBACK)) return XAException.XA_HEURRB; if (this.equals(HEURISTIC_COMMIT)) return XAException.XA_HEURCOM; if (this.equals(HEURISTIC_MIXED)) return XAException.XA_HEURMIX; if (this.equals(HEURISTIC_HAZARD)) return XAException.XA_HEURHAZ; return UNKNOWN_XA_ERROR_CODE; } }
@Override public String getHeuristicStatus() { return HeuristicStatus.intToStatus(xares.heuristic).name(); }
public String setStatus(ParticipantStatus newState) { if (getListType().equals(newState)) return "participant is prepared for recovery"; /* * Only move a heuristic to the prepared list if it hasn't already committed or rolled back */ if (newState.equals(ParticipantStatus.PREPARED) && getListType().equals(ParticipantStatus.HEURISTIC)) { HeuristicStatus heuristicStatus = HeuristicStatus.valueOf(getHeuristicStatus()); if (heuristicStatus.equals(HeuristicStatus.HEURISTIC_COMMIT) || heuristicStatus.equals(HeuristicStatus.HEURISTIC_ROLLBACK)) { return "participant has already committed or rolled back"; } } if (parent != null && parent.setStatus(this, newState)) { listType = newState; if (newState == ParticipantStatus.PREPARED ) return "participant recovery will be attempted during the next recovery pass"; return "participant status change was successful"; } else { return "participant status change failed"; } }
public String getStatus() { if (isHeuristic()) { String type = getHeuristicStatus(); if (!type.equals(HeuristicStatus.UNKNOWN.name())) return type; } return listType.toString(); }
public int getXAErrorCode() { if (this.equals(HEURISTIC_ROLLBACK)) return XAException.XA_HEURRB; if (this.equals(HEURISTIC_COMMIT)) return XAException.XA_HEURCOM; if (this.equals(HEURISTIC_MIXED)) return XAException.XA_HEURMIX; if (this.equals(HEURISTIC_HAZARD)) return XAException.XA_HEURHAZ; return UNKNOWN_XA_ERROR_CODE; } }
@Override public String getHeuristicStatus() { return HeuristicStatus.intToStatus(xares.heuristic).name(); }
public String setStatus(ParticipantStatus newState) { if (getListType().equals(newState)) return "participant is prepared for recovery"; /* * Only move a heuristic to the prepared list if it hasn't already committed or rolled back */ if (newState.equals(ParticipantStatus.PREPARED) && getListType().equals(ParticipantStatus.HEURISTIC)) { HeuristicStatus heuristicStatus = HeuristicStatus.valueOf(getHeuristicStatus()); if (heuristicStatus.equals(HeuristicStatus.HEURISTIC_COMMIT) || heuristicStatus.equals(HeuristicStatus.HEURISTIC_ROLLBACK)) { return "participant has already committed or rolled back"; } } if (parent != null && parent.setStatus(this, newState)) { listType = newState; if (newState == ParticipantStatus.PREPARED ) return "participant recovery will be attempted during the next recovery pass"; return "participant status change was successful"; } else { return "participant status change failed"; } }
public String getStatus() { if (isHeuristic()) { String type = getHeuristicStatus(); if (!type.equals(HeuristicStatus.UNKNOWN.name())) return type; } return listType.toString(); }
public int getXAErrorCode() { if (this.equals(HEURISTIC_ROLLBACK)) return XAException.XA_HEURRB; if (this.equals(HEURISTIC_COMMIT)) return XAException.XA_HEURCOM; if (this.equals(HEURISTIC_MIXED)) return XAException.XA_HEURMIX; if (this.equals(HEURISTIC_HAZARD)) return XAException.XA_HEURHAZ; return UNKNOWN_XA_ERROR_CODE; } }
@Override public String getHeuristicStatus() { return HeuristicStatus.intToStatus(xares.heuristic).name(); }
public String setStatus(ParticipantStatus newState) { if (getListType().equals(newState)) return "participant is prepared for recovery"; /* * Only move a heuristic to the prepared list if it hasn't already committed or rolled back */ if (newState.equals(ParticipantStatus.PREPARED) && getListType().equals(ParticipantStatus.HEURISTIC)) { HeuristicStatus heuristicStatus = HeuristicStatus.valueOf(getHeuristicStatus()); if (heuristicStatus.equals(HeuristicStatus.HEURISTIC_COMMIT) || heuristicStatus.equals(HeuristicStatus.HEURISTIC_ROLLBACK)) { return "participant has already committed or rolled back"; } } if (parent != null && parent.setStatus(this, newState)) { listType = newState; if (newState == ParticipantStatus.PREPARED ) return "participant recovery will be attempted during the next recovery pass"; return "participant status change was successful"; } else { return "participant status change failed"; } }