5 Replies Latest reply on Oct 28, 2008 3:19 AM by beve

    How to invoke ESB service from action?

    denix

      In our application we need the possibility to send messages to other services from our action which is always running.
      What is preferred way? Send message in queue or maybe JBoss has appropriate API. What you suggest to use?

        • 1. Re: How to invoke ESB service from action?
          beve

          Take a look at the StaticRouter action or the StaticWiretap action depending on whether your action pipleine continues after sending the message to the other service(s).
          For more information about these actions please refer to the "StaticRouter" and "StaticWiretap" sections in the ProgrammersGuide.pdf.

          Regards,

          /Daniel

          • 2. Re: How to invoke ESB service from action?
            denix

            Daniel, I know about StaticRouter/StaticWiretap, but consider the situation we have:
            We have service which has action inside which we listen to external queue, i.e. queue which is not wired to JBoss ESB.
            When message arrives to this external queue we should stay in this action and also send notification to other JBoss ESB service.
            So we don't have action pipeline but we need to invoke other ESB services.

            • 3. Re: How to invoke ESB service from action?
              beve

               

              We have a service which has an action inside which we listen to external queue, i.e. queue which is not wired to JBoss ESB.

              The service in this case is not an ESB Service and the action is not an ESB action, is that correct? If this is the case then you could use the ServiceInvoker to invoke ESB services.





              • 4. Re: How to invoke ESB service from action?
                denix

                No, it is ESB Service and ESB Action which belongs to this service, but we cannot continue action pipeline, we should always stay in this action and have the possibility to invoke other ESB Services.
                It looks like we have to threads in one JBoss ESB action: one listen to a queue, second works with other ESB services.

                Do we need to use ServiceInvoker also in this case?

                • 5. Re: How to invoke ESB service from action?
                  beve

                   

                  Do we need to use ServiceInvoker also in this case?

                  No, if you are in an action pipeline the routers will accomplish the same thing.