4 Replies Latest reply on Oct 11, 2007 11:26 PM by Burr Sutter

    Implementing a new gateway/listener?

    stscit04 Newbie

      Hello,

      I want to implement a gateway that polls our proprietary system via tcp/ip. Is there a way besides implementing an RA for this system and then
      using a JCA-Gateway implementation that uses this RA?

      Thanks,

      Stefan

        • 1. Re: Implementing a new gateway/listener?
          Tom Fennelly Master

          If you're interested in creating a "gateway" to perform a scheduled task, check out the <scheduled-listener>. See "Advanced Topics -> Scheduling of Services" in the programmers manual.

          • 2. Re: Implementing a new gateway/listener?
            stscit04 Newbie

            Thanks for your suggestion. Looks like this may help in order
            to poll the legacy app. Is there another way to implement
            custom gateways? I ask because there are other systems that will not be
            polled but rather work like clients

            1 They connect to the esb-GW
            2 deliver their message
            3 disconnect

            All of this over TCP/IP with a proprietary application-level protocol.

            Best regards,
            Stefan

            • 3. Re: Implementing a new gateway/listener?
              Burr Sutter Master

              A gateway is purely a technology for receiving/collecting data from whatever source you have and converting that inbound data to an ESB Message - org.jboss.soa.esb.message.Message

              We have a poller/schedule based service that is easy to modify. We also have a JCA gateway that works with any JCA adapter that supports inflow.

              However, if you can write java code to receive the data from your legacy system (we also have a socket listener gateway) then you simply use the following code to invoke the ESB Service natively.

               ServiceInvoker invoker;
               Message requestMessage;
               Message replyMessage = null;
               invoker = new ServiceInvoker("ActionServices", "CustomActionService");
               requestMessage = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
               requestMessage.getBody().add(msgText);
              
               invoker.deliverAsync(requestMessage); // no waiting for a response
              
               // now delivery it and wait for a response
               replyMessage = invoker.deliverSync(requestMessage, 20000);


              Burr

              • 4. Re: Implementing a new gateway/listener?
                Burr Sutter Master

                I have another quickstart that illustrates how to build your own poller-based gateway. Send me an email and I'll send it out to you (It won't make 4.2.1 but it does work for demo purposes).

                Burr