Results 1 to 2 of 2

Thread: How to synchronously wait for remote process triggered by a JMS message to finish

  1. #1
    Join Date
    Feb 2013
    Posts
    1

    Default How to synchronously wait for remote process triggered by a JMS message to finish

    Hi all,
    I would like to do the following:
    In my service method, I would like to send a few JMS Messages out, and then register as a message listener to the response queue and synchronously wait until a message intended for me arrives on a response queue when the processing is DONE. The bottom line is I do not want to relieve the thread until the async processing is finished.

    This is similar to using an executor which returns a Future and the caller waits on future.get. However, since the processing is happening on the remote machine which was triggered by a JMS Message, I am confused on how I could use future.get.

    Any help would be appreciated.

    Thanks,
    Pramod

  2. #2
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,022

    Default

    Use a Spring Integration <jms:outbound-gateway/>.

    http://static.springsource.org/sprin...tbound-gateway
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •