• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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 ?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic