2 Replies Latest reply on May 3, 2013 2:48 AM by Martin Myslík

    Sending a message through Scheduler

    Martin Myslík Newbie



      I am quite new to ESB and I would like to send messages from a service through simple scheduler. I have a class that has method which sends and ESB aware message:


      public void sendMessage(String message) throws Exception


            // Create the delivery adapter for the target service (cache it)




            // Create the delivery adapter for the target service (cache it)

            ServiceInvoker deliveryAdapter = new ServiceInvoker("FirstServiceESB",




            // Create and populate the request message...

            Message requestMessage = MessageFactory.getInstance().getMessage(





            // Deliver the request message synchronously - timeout after 20

            // seconds...




      I found only very vague tutorials on how to implement Scheduler (I mean in jboss-esb.xml file). How do I trigger this method? Can you show me and example jboss-esb.xml configuration taht would call sendMessage() function multiple times?