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.
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
All of this over TCP/IP with a proprietary application-level protocol.
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);
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).