public static AbstractRecord create () { return new ParticipantRecord(); }
public static AbstractRecord create () { return new ParticipantRecord(); }
/** * Enrol the specified participant with the coordinator associated with the * current thread. * * @param act The participant. * * @exception WrongStateException * Thrown if the coordinator is not in a state that allows * participants to be enrolled. * @exception DuplicateParticipantException * Thrown if the participant has already been enrolled and * the coordination protocol does not support multiple * entries. * @exception InvalidParticipantException * Thrown if the participant is invalid. * @exception SystemException * Thrown if any other error occurs. */ public void enlistParticipant (Participant act) throws WrongStateException, DuplicateParticipantException, InvalidParticipantException, SystemException { if (act == null) throw new InvalidParticipantException(); AbstractRecord rec = new ParticipantRecord(act, new Uid()); if (add(rec) != AddOutcome.AR_ADDED) throw new WrongStateException(); }
/** * Enrol the specified participant with the coordinator associated with the * current thread. * * @param act The participant. * * @exception WrongStateException * Thrown if the coordinator is not in a state that allows * participants to be enrolled. * @exception DuplicateParticipantException * Thrown if the participant has already been enrolled and * the coordination protocol does not support multiple * entries. * @exception InvalidParticipantException * Thrown if the participant is invalid. * @exception SystemException * Thrown if any other error occurs. */ public void enlistParticipant (Participant act) throws WrongStateException, DuplicateParticipantException, InvalidParticipantException, SystemException { if (act == null) throw new InvalidParticipantException(); AbstractRecord rec = new ParticipantRecord(act, new Uid()); if (add(rec) != AddOutcome.AR_ADDED) throw new WrongStateException(); }