Search in sources :

Example 36 with Task

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

the class TerminationCoordinatorPortTypeImpl method completeOperation.

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

        public void executeTask() {
            TerminationCoordinatorProcessor.getProcessor().complete(complete, inboundMap, arjunaContext);
        }
    });
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) 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 37 with Task

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

the class TerminationParticipantPortTypeImpl method cancelledOperation.

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

        public void executeTask() {
            TerminationParticipantProcessor.getProcessor().handleCancelled(cancelled, 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 38 with Task

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

the class TerminationParticipantPortTypeImpl method closedOperation.

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

        public void executeTask() {
            TerminationParticipantProcessor.getProcessor().handleClosed(closed, 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 39 with Task

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

the class TerminationParticipantPortTypeImpl method completedOperation.

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

        public void executeTask() {
            TerminationParticipantProcessor.getProcessor().handleCompleted(completed, 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 40 with Task

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

the class TerminationParticipantPortTypeImpl method faultOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "FaultOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Fault")
@Oneway
public void faultOperation(@WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") Fault parameters) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    final SoapFault soapFault = SoapFault11.fromFault(parameters);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            TerminationParticipantProcessor.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)

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