• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMS Listener vs receive() method + Web Service.

 
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Guys,

I have implemented a web service client, which takes XML as an input and returns XML output.

I am converting that XML into fix length format to pass it to mainframe system and mainframe system will return fix length string.

I am calling mainframe system using JMS and using CorrelationID for identifying response.
I am using receive() method with correlation id as message selector and timeout of 5 seconds to get response from mainframe systems.
However the one who reviewed my code said. "Instead of using receive() method use Listener."

Now i am not able to understand how can i use Listener which works asynchronously with the web service which works synchronously.
Web service need to send response within few seconds.
How can i bind Listener's onMessage(Object object) with web service response ?

How do i design it ?
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic