Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

hi  RSS feed

 
Ram Sateesh Talari
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone,

I am using a JBoss App.Server. and MySQL DB.

I know very little about JMS...(writing ptp clients, standalone)

Now I have to send a message to the queue everytime insert happens in a particular table of my db.

I have to write a listener which can get the messages async. and process the data.

Now all I need to know is that how do I send a message to the queue whenever an insert happens.. please help

Cheers
Ram
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can write a message-driven bean whose type is associated with the queue (in the DD). A MDB is a listener as it implements the javax.jms.MessageListener interface. When the message is received by the JMS Server, the container will pull an instance of the MDB from the pool to service the request. The instance's onMessage() method is invoked and the message passed in. It is from this method that you will process the message data.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!