Class ParticipantEngine
java.lang.Object
com.arjuna.wst11.messaging.engines.ParticipantEngine
- All Implemented Interfaces:
com.arjuna.webservices11.wsat.ParticipantInboundEvents
public class ParticipantEngine
extends Object
implements com.arjuna.webservices11.wsat.ParticipantInboundEvents
The participant state engine
- Author:
- kevin
-
Constructor Summary
ConstructorDescriptionParticipantEngine
(Participant participant, String id, com.arjuna.webservices11.wsat.State state, jakarta.xml.ws.wsaddressing.W3CEndpointReference coordinator, boolean recovered) Construct the engine for the participant in a specified state.ParticipantEngine
(Participant participant, String id, jakarta.xml.ws.wsaddressing.W3CEndpointReference coordinator) Construct the initial engine for the participant. -
Method Summary
Modifier and TypeMethodDescriptionvoid
commit
(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification commit, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext) Handle the commit event.void
Handle the early readonly event.void
Handle the early rollback event.jakarta.xml.ws.wsaddressing.W3CEndpointReference
Return the endpoint reference for the coordinator associated with this participant.getId()
Get the coordinator id.boolean
Is the participant persisted to disk?boolean
Is the participant recovered?void
prepare
(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification prepare, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext) Handle the prepare event.void
recovery()
Handle the recovery event.void
rollback
(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification rollback, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext) Handle the rollback event.void
soapFault
(com.arjuna.webservices.SoapFault soapFault, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext) Handle the soap fault event.
-
Constructor Details
-
ParticipantEngine
public ParticipantEngine(Participant participant, String id, jakarta.xml.ws.wsaddressing.W3CEndpointReference coordinator) Construct the initial engine for the participant.- Parameters:
participant
- The participant.id
- The participant id.coordinator
- The coordinator endpoint reference.
-
ParticipantEngine
public ParticipantEngine(Participant participant, String id, com.arjuna.webservices11.wsat.State state, jakarta.xml.ws.wsaddressing.W3CEndpointReference coordinator, boolean recovered) Construct the engine for the participant in a specified state.- Parameters:
participant
- The participant.id
- The participant id.state
- The initial state.coordinator
- The coordinator endpoint reference.
-
-
Method Details
-
commit
public void commit(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification commit, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext) Handle the commit event.- Specified by:
commit
in interfacecom.arjuna.webservices11.wsat.ParticipantInboundEvents
- Parameters:
commit
- The commit notification.map
- The addressing context.arjunaContext
- The arjuna context. None -> None (send committed) Active -> Aborting (do nothing) Preparing -> Aborting (do nothing) PreparedSuccess -> Committing (initiate commit) Committing -> Committing (do nothing) Aborting -> Aborting (do nothing)
-
prepare
public void prepare(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification prepare, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext) Handle the prepare event.- Specified by:
prepare
in interfacecom.arjuna.webservices11.wsat.ParticipantInboundEvents
- Parameters:
prepare
- The prepare notification.map
- The addressing context.arjunaContext
- The arjuna context. None -> None (send aborted) Active -> Preparing (execute prepare) Preparing -> Preparing (do nothing) PreparedSuccess -> PreparedSuccess (resend prepared) Committing -> Committing (ignore) Aborting -> Aborting (send aborted and forget)
-
rollback
public void rollback(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification rollback, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext) Handle the rollback event.- Specified by:
rollback
in interfacecom.arjuna.webservices11.wsat.ParticipantInboundEvents
- Parameters:
rollback
- The rollback notification.map
- The addressing context.arjunaContext
- The arjuna context. None -> None (send aborted) Active -> Aborting (execute rollback, send aborted and forget) Preparing -> Aborting (execute rollback, send aborted and forget) PreparedSuccess -> Aborting (execute rollback, send aborted and forget) Committing -> Committing (ignore) Aborting -> Aborting (send aborted and forget)
-
earlyRollback
public void earlyRollback()Handle the early rollback event. None -> None Active -> Aborting (execute rollback, send aborted and forget) Preparing -> Aborting (execute rollback, send aborted and forget) PreparedSuccess -> PreparedSuccess Committing -> Committing Aborting -> Aborting -
earlyReadonly
public void earlyReadonly()Handle the early readonly event. None -> None Active -> None (send ReadOnly) Preparing -> None (send ReadOnly) PreparedSuccess -> PreparedSuccess Committing -> Committing Aborting -> Aborting -
recovery
public void recovery()Handle the recovery event. None -> None Active -> Active Preparing -> Preparing Committing -> Committing PreparedSuccess -> PreparedSuccess (resend Prepared) Aborting -> Aborting -
soapFault
public void soapFault(com.arjuna.webservices.SoapFault soapFault, org.jboss.ws.api.addressing.MAP map, com.arjuna.webservices11.wsarj.ArjunaContext arjunaContext) Handle the soap fault event.- Specified by:
soapFault
in interfacecom.arjuna.webservices11.wsat.ParticipantInboundEvents
- Parameters:
soapFault
- The soap fault.map
- The addressing context.arjunaContext
- The arjuna context.
-
getId
Get the coordinator id.- Returns:
- The coordinator id.
-
getCoordinator
public jakarta.xml.ws.wsaddressing.W3CEndpointReference getCoordinator()Description copied from interface:com.arjuna.webservices11.wsat.ParticipantInboundEvents
Return the endpoint reference for the coordinator associated with this participant.- Specified by:
getCoordinator
in interfacecom.arjuna.webservices11.wsat.ParticipantInboundEvents
- Returns:
- the coordinator endpoint reference
-
isPersisted
public boolean isPersisted()Is the participant persisted to disk?- Returns:
- true if persisted, false otherwise.
-
isRecovered
public boolean isRecovered()Is the participant recovered?- Returns:
- true if recovered, false otherwise.
-