/** * The current activity is completing and informs the participants * that all work they need to know about has been received. */ public void complete () throws WrongStateException, SystemException { currentCoordinator().complete(); }
/** * The current activity is completing and informs the participants * that all work they need to know about has been received. */ public void complete () throws WrongStateException, SystemException { currentCoordinator().complete(); }
/** * close the activity * @return * @throws SystemException */ public int close () throws SystemException { // we need to make sure all coordinator completion aprticipants ahve completed try { complete(); } catch (Exception e) { // carry on as end will catch any further problems } // now call end(). if any of the participant completion participants are not // completed they will throw a WrongStateException during prepare leading to rollback return end(true); }
/** * close the activity * @return * @throws SystemException */ public int close () throws SystemException { // we need to make sure all coordinator completion aprticipants ahve completed try { complete(); } catch (Exception e) { // carry on as end will catch any further problems } // now call end(). if any of the participant completion participants are not // completed they will throw a WrongStateException during prepare leading to rollback return end(true); }
/** * this is driven by a coordinator-completion participant registered on behalf of the coordinator * and is required to propagate the complete to all registered coordinator-completion participants. * @return the result of preparing the transaction */ public void complete () throws WrongStateException, SystemException { // if this goes wrong here then we will throw an exception super.complete(); // now we need to run phase one of commit // TODO -- need to do completion processing here? int outcome = super.prepare(true); // if we have prepared ok (or are read only) then status will be COMMITTING if (outcome == TwoPhaseOutcome.PREPARE_NOTOK) { // phase 1 failed so we need to run phase 2 abort // this will set status to ABORTED phase2Abort(true); } // no need to return anything as the caller can just check the status }
/** * this is driven by a coordinator-completion participant registered on behalf of the coordinator * and is required to propagate the complete to all registered coordinator-completion participants. * @return the result of preparing the transaction */ public void complete () throws WrongStateException, SystemException { // if this goes wrong here then we will throw an exception super.complete(); // now we need to run phase one of commit // TODO -- need to do completion processing here? int outcome = super.prepare(true); // if we have prepared ok (or are read only) then status will be COMMITTING if (outcome == TwoPhaseOutcome.PREPARE_NOTOK) { // phase 1 failed so we need to run phase 2 abort // this will set status to ABORTED phase2Abort(true); } // no need to return anything as the caller can just check the status }