Saturday, April 01, 2006

JMS

Though I have used MQ Series in all the projects I have worked so far, i never got a chance to write a messaging program from scratch. Opportunity came when my ex-project mate requested me to take a training on JMS for his team members.

I started searching google for sample code that might help me write a simple "put" , "get" program, finally got one from Sun itself.

Assumptions
You are expected to have some basic understanding of messaging concepts.

H/W and S/W
This uses IBM MQ Series and the middleware, and tomcat servlet container.

What the program does




As shown above, this sample application has a text box where user can type something and on clicking "put" button, message will be send to a queue.

Clicking on "get" button will retrieve the first message in the queue and the message will be shown in the text box.

Logic for putting the message into queue