8 Replies Latest reply on Jan 28, 2014 5:27 AM by erasmo da rotterdam

    Building a rest service that pushes into a jms queue - howto?

    erasmo da rotterdam Newbie


      I built a service that can be invoked by a rest binding and is implemented by a bean implementation.

      I would like to push into a jms queue upon a rest request, so that i can activate an asynchronous elaboration simply by invoking a restful web service.


      All works great but the jms invocation looks like to be synchronous, that is my bean is blocked until the jms consumer has not finished its job.

      my bean is



      @Service(MyServiceBean .class)

      public class MyServiceBean implements MyService{



        @Inject @Reference("MyServiceJMS")

        MyServiceJMS service;



        public int operation(Integer a) {




        return 0;





      when I invoke it through the web browser, the page loads until the service.operation() line has not finished.


      I was expecting that service.operation() would have pushed into the jms queue and returned quickly. Any help?



      Thank you