Search in sources :

Example 51 with Task

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

the class BusinessAgreementWithParticipantCompletionParticipantPortTypeImpl method cancelOperation.

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

        public void executeTask() {
            ParticipantCompletionParticipantProcessor.getProcessor().cancel(cancel, 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)

Example 52 with Task

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

the class CompletionCoordinatorPortTypeImpl method rollbackOperation.

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

        public void executeTask() {
            CompletionCoordinatorProcessor.getProcessor().rollback(rollback, 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 53 with Task

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

the class CompletionInitiatorPortTypeImpl method soapFault.

@WebMethod(operationName = "SoapFault", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/fault")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/fault")
public void soapFault(@WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") Fault fault) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    final SoapFault soapFault = SoapFault11.fromFault(fault);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            CompletionInitiatorProcessor.getProcessor().handleSoapFault(soapFault, inboundMap, arjunaContext);
            ;
        }
    });
}
Also used : SoapFault(com.arjuna.webservices.SoapFault) 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) Action(javax.xml.ws.Action)

Example 54 with Task

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

the class CompletionInitiatorPortTypeImpl 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() {
            CompletionInitiatorProcessor.getProcessor().handleCommitted(committed, 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 55 with Task

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

the class CoordinatorPortTypeImpl method soapFault.

@WebMethod(operationName = "SoapFault", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/fault")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/fault")
public void soapFault(@WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") Fault fault) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    final SoapFault soapFault = SoapFault11.fromFault(fault);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            CoordinatorProcessor.getProcessor().soapFault(soapFault, inboundMap, arjunaContext);
            ;
        }
    });
}
Also used : SoapFault(com.arjuna.webservices.SoapFault) 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) 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