Search in sources :

Example 26 with Task

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

the class ParticipantPortTypeImpl 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() {
            ParticipantProcessor.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)

Example 27 with Task

use of com.arjuna.services.framework.task.Task 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);
        }
    });
}
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 28 with Task

use of com.arjuna.services.framework.task.Task 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);
        }
    });
}
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 29 with Task

use of com.arjuna.services.framework.task.Task 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);
        }
    });
}
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 30 with Task

use of com.arjuna.services.framework.task.Task 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);
        }
    });
}
Also used : ExceptionType(org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType) 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