Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JMS: Listener to Receive Messages From MQ Server ( Request Queue)

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

For one integration we are using MQ for messaging (in xml format : that needs to be parsed based on xsd ).

I need to write some listener, who continuously keeps on listing the Request Queue, and as soon as message comes it receives the message (XML) and parse it and save the containing
data in Database.

I tried after some R&D, synchronous communication by creating connection/session and then receiver object to receive message.

Now I want to make This Listener as Asynchronous, that would continuously checking the queue and if any message is there, it should process it.

Can you Please provide some suggestions ?? Or if possible a code snippet would be much helpful.

Regards,
Vivek Mathur
 
Vivek Mathur
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I tried using MDB (Message Driven Beans), as it implements mesagelistener interface and may help in Asynchronous communication with Websphere MQ.
However I am unable to make a connection to QUEUES using JNDI, every time MDB is giving exception as javax.naming.exception ( Queue not bound with queue mangaer "Queue MangerName") and JNDI context wsmq not bound.


Can any one give some light over it ???

Regards,
Vivek Mathur
 
I’m tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic