3 Replies Latest reply on Sep 9, 2009 10:43 AM by c4s4l

    Custom Service Actions Processed Out of Order

    c4s4l

      Hello,

      I have a service with 3 custom actions that is invoked asynchronously and the last action is being processed before the first 2. Is this a normal behavior with custom actions?Why isn't the chain being respected?

      BRegards,
      Sergio

        • 1. Re: Custom Service Actions Processed Out of Order
          beve

          Hi Sergio,

          Is this a normal behavior with custom actions?

          No, this should not be happening. Could you modify one of the quickstarts to demonstrate this so I can take a look at it?

          Thanks,

          /Daniel

          • 2. Re: Custom Service Actions Processed Out of Order
            kconner

            The chain is respected, they are not executed out of sequence. Why do you believe this is not happening?

            If you enable DEBUG logging on the ActionProcessingPipeline then you will see messages for each action displayed similar to the following

            executing processor 0 <processor class>

            Kev

            • 3. Re: Custom Service Actions Processed Out of Order
              c4s4l

              Thanks for the response, I was just checking because I was assuming that the order was to respect.
              I've identified the problem origin but I'm getting a behavior that I can't understand so can you help?

              My senario is:

              Service Caller does:

              Message message = MessageFactory.getInstance().getMessage();
              message.getProperties().setProperty("org.jboss.soa.esb.dls.redeliver",false);
              message.getHeader().getCall().setFaultTo(new LogicalEPR(FAULT_SERVICE_CATEGORY, FAULT_SERVICE_NAME));
              
              ServiceInvoker serviceInvoker = new ServiceInvoker("ServiceACategory",
               "ServiceA");
              serviceInvoker.deliverAsync(message)
              


              The ServiceA has 2 actions and in the first it throws an ActionProcessingFaultException with a faultMessage created as

              Message newMessage = MessageFactory.getInstance().getMessage();
              newMessage.getBody().merge(originalMessage.getBody());
              newMessage.getFault().setCode(URI.create(errorCode));
              newMessage.getFault().setReason(errorMessage);
              newMessage.getProperties().setProperty("org.jboss.soa.esb.dls.redeliver", false);
              


              After this the behavior is normal and the FaultService is called and all goes well and after it the second action from serviceA is called, all correct.

              The problem is when I put a StaticWiretap to a ServiceB in an action (last) from the FaultService because the ServiceA is called again once that ServiceB ends its execution. I assume that this is a problem related to the headers, but I'm creating a newMessage to avoid that kind of errors. ServiceA and ServiceB are not related. I'm also disabling redeliver to prevent that behavior, so I can't understand whats happening.

              Thanks,
              Sergio