Search in sources :

Example 1 with Task

use of com.arjuna.services.framework.task.Task in project narayana by jbosstm.

the class TerminationCoordinatorPortTypeImpl method closeOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "CloseOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Close")
@Oneway
public void closeOperation(@WebParam(name = "Close", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters") NotificationType parameters) {
    if (WSTLogger.logger.isTraceEnabled()) {
        WSTLogger.logger.trace(getClass().getSimpleName() + ".closeOperation");
    }
    MessageContext ctx = webServiceCtx.getMessageContext();
    final NotificationType close = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            TerminationCoordinatorProcessor.getProcessor().close(close, inboundMap, arjunaContext);
        }
    });
}
Also used : Task(com.arjuna.services.framework.task.Task) NotificationType(com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType) MessageContext(javax.xml.ws.handler.MessageContext) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP)

Example 2 with Task

use of com.arjuna.services.framework.task.Task in project narayana by jbosstm.

the class TerminationParticipantPortTypeImpl method faultedOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "FaultedOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Faulted")
@Oneway
public void faultedOperation(@WebParam(name = "Faulted", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters") NotificationType parameters) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final NotificationType faulted = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            TerminationParticipantProcessor.getProcessor().handleFaulted(faulted, inboundMap, arjunaContext);
        }
    });
}
Also used : Task(com.arjuna.services.framework.task.Task) NotificationType(com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType) MessageContext(javax.xml.ws.handler.MessageContext) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP)

Example 3 with Task

use of com.arjuna.services.framework.task.Task in project narayana by jbosstm.

the class CompletionCoordinatorPortTypeImpl method commitOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "CommitOperation", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Commit")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Commit")
public void commitOperation(@WebParam(name = "Commit", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters") Notification parameters) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final Notification commit = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            CompletionCoordinatorProcessor.getProcessor().commit(commit, inboundMap, arjunaContext);
        }
    });
}
Also used : Task(com.arjuna.services.framework.task.Task) MessageContext(javax.xml.ws.handler.MessageContext) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP) Notification(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification) Action(javax.xml.ws.Action)

Example 4 with Task

use of com.arjuna.services.framework.task.Task in project narayana by jbosstm.

the class BusinessAgreementWithCoordinatorCompletionCoordinatorPortTypeImpl method statusOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "StatusOperation", action = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Status")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Status")
public void statusOperation(@WebParam(name = "Status", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsba/2006/06", partName = "parameters") StatusType parameters) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final StatusType status = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getContext(ctx);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            CoordinatorCompletionCoordinatorProcessor.getProcessor().status(status, inboundMap, arjunaContext);
        }
    });
}
Also used : Task(com.arjuna.services.framework.task.Task) StatusType(org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType) MessageContext(javax.xml.ws.handler.MessageContext) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP) Action(javax.xml.ws.Action)

Example 5 with Task

use of com.arjuna.services.framework.task.Task in project narayana by jbosstm.

the class BusinessAgreementWithCoordinatorCompletionCoordinatorPortTypeImpl method compensatedOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "CompensatedOperation", action = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Compensated")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Compensated")
public void compensatedOperation(@WebParam(name = "Compensated", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsba/2006/06", partName = "parameters") NotificationType parameters) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final NotificationType compensated = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            CoordinatorCompletionCoordinatorProcessor.getProcessor().compensated(compensated, inboundMap, arjunaContext);
        }
    });
}
Also used : Task(com.arjuna.services.framework.task.Task) NotificationType(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType) MessageContext(javax.xml.ws.handler.MessageContext) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP) Action(javax.xml.ws.Action)

Aggregations

Task (com.arjuna.services.framework.task.Task)62 ArjunaContext (com.arjuna.webservices11.wsarj.ArjunaContext)62 MessageContext (javax.xml.ws.handler.MessageContext)62 MAP (org.jboss.ws.api.addressing.MAP)62 Action (javax.xml.ws.Action)53 NotificationType (org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType)29 Notification (org.oasis_open.docs.ws_tx.wsat._2006._06.Notification)11 SoapFault (com.arjuna.webservices.SoapFault)9 NotificationType (com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType)7 StatusType (org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType)4 ExceptionType (org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType)2 HttpServletRequest (javax.servlet.http.HttpServletRequest)1