/** * Construct the engine for the coordinator in a specified state. * @param id The coordinator id. * @param durable true if the participant is durable, false if volatile. * @param participant The participant endpoint reference. * @param state The initial state. */ public CoordinatorEngine(final String id, final boolean durable, final W3CEndpointReference participant, boolean recovered, final State state) { this.id = id ; this.instanceIdentifier = new InstanceIdentifier(id) ; this.durable = durable ; this.participant = participant ; this.state = state ; this.recovered = recovered; // unrecovered participants are always activated // we only need to reactivate recovered participants which were successfully prepared // any others will only have been saved because of a heuristic outcome e.g. a comms // timeout at prepare will write a heuristic record for an ABORTED TX including a // participant in state PREPARING. we can safely drop it since we implement presumed abort. if (!recovered || state == State.STATE_PREPARED_SUCCESS) { CoordinatorProcessor.getProcessor().activateCoordinator(this, id) ; } }
/** * Construct the engine for the coordinator in a specified state. * @param id The coordinator id. * @param durable true if the participant is durable, false if volatile. * @param participant The participant endpoint reference. * @param state The initial state. */ public CoordinatorEngine(final String id, final boolean durable, final W3CEndpointReference participant, boolean recovered, final State state) { this.id = id ; this.instanceIdentifier = new InstanceIdentifier(id) ; this.durable = durable ; this.participant = participant ; this.state = state ; this.recovered = recovered; // unrecovered participants are always activated // we only need to reactivate recovered participants which were successfully prepared // any others will only have been saved because of a heuristic outcome e.g. a comms // timeout at prepare will write a heuristic record for an ABORTED TX including a // participant in state PREPARING. we can safely drop it since we implement presumed abort. if (!recovered || state == State.STATE_PREPARED_SUCCESS) { CoordinatorProcessor.getProcessor().activateCoordinator(this, id) ; } }
/** * Construct the engine for the coordinator in a specified state. * @param id The coordinator id. * @param durable true if the participant is durable, false if volatile. * @param participant The participant endpoint reference. * @param state The initial state. */ public CoordinatorEngine(final String id, final boolean durable, final W3CEndpointReference participant, boolean recovered, final State state) { this.id = id ; this.instanceIdentifier = new InstanceIdentifier(id) ; this.durable = durable ; this.participant = participant ; this.state = state ; this.recovered = recovered; // unrecovered participants are always activated // we only need to reactivate recovered participants which were successfully prepared // any others will only have been saved because of a heuristic outcome e.g. a comms // timeout at prepare will write a heuristic record for an ABORTED TX including a // participant in state PREPARING. we can safely drop it since we implement presumed abort. if (!recovered || state == State.STATE_PREPARED_SUCCESS) { CoordinatorProcessor.getProcessor().activateCoordinator(this, id) ; } }