use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class ParticipantEngine method prepare.
/**
* Handle the prepare event.
* @param prepare The prepare notification.
* @param map The addressing context.
* @param 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)
*/
public void prepare(final Notification prepare, final MAP map, final ArjunaContext arjunaContext) {
final State current;
synchronized (this) {
current = state;
if (current == State.STATE_ACTIVE) {
state = State.STATE_PREPARING;
}
}
if (current == State.STATE_ACTIVE) {
executePrepare();
} else if (current == State.STATE_PREPARED_SUCCESS) {
sendPrepared();
} else if ((current == State.STATE_ABORTING) || (current == null)) {
sendAborted();
forget();
}
}
use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class CoordinatorPortTypeImpl method preparedOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "PreparedOperation", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Prepared")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Prepared")
public void preparedOperation(@WebParam(name = "Prepared", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters") Notification parameters) {
MessageContext ctx = webServiceCtx.getMessageContext();
final Notification prepared = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
CoordinatorProcessor.getProcessor().prepared(prepared, inboundMap, arjunaContext);
}
});
}
use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class CoordinatorPortTypeImpl method committedOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "CommittedOperation", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Committed")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Committed")
public void committedOperation(@WebParam(name = "Committed", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters") Notification parameters) {
MessageContext ctx = webServiceCtx.getMessageContext();
final Notification committed = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
CoordinatorProcessor.getProcessor().committed(committed, inboundMap, arjunaContext);
}
});
}
use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class CoordinatorPortTypeImpl method readOnlyOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "ReadOnlyOperation", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/ReadOnly")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/ReadOnly")
public void readOnlyOperation(@WebParam(name = "ReadOnly", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters") Notification parameters) {
MessageContext ctx = webServiceCtx.getMessageContext();
final Notification readOnly = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
CoordinatorProcessor.getProcessor().readOnly(readOnly, inboundMap, arjunaContext);
}
});
}
use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionCoordinatorPortTypeImpl method failOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "FailOperation", action = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Fail")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Fail")
public void failOperation(@WebParam(name = "Fail", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsba/2006/06", partName = "parameters") ExceptionType parameters) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.trace(getClass().getSimpleName() + ".failOperation");
}
MessageContext ctx = webServiceCtx.getMessageContext();
final ExceptionType fail = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
ParticipantCompletionCoordinatorProcessor.getProcessor().fail(fail, inboundMap, arjunaContext);
}
});
}
Aggregations