Wednesday, May 21, 2008

Java Messaging with Weblogic - Part 1

I learnt JMS a few months ago when we had to develop a messaging application for a prospective client. The requirement was to enable communication between an application built on .NET with another application (to-be) built on enterprise Java. We could have used plain old web-services, but we decided to go ahead with a SOA (service oriented architecture) so as to build a scalable, reusable and robust system.

This tutorial is spread across in parts so as not to bore my tiny audience. And btw, I am not sure how much will this activity of mine be welcomed. Anyways, the only intent of KT (Knowledge Transfer) through blogging is to impart knowledge.

By no chance is it meant to boast around!
So here we go!

What is JMS?
************

JMS stands for Java Messaging Service and is a set of APIs that facilitate communication between a java virtual environment (JVM) and a messaging broker (also known as JMS Provider) There are a few many JMS providers in market - Websphere MQ, Weblogic JMS, Active MQ, Open JMS etc etc.

I would recommend Weblogic JMS over others due to its simplicity and ease of use. But mind you, its not free for production!

So the JMS API exposes interfaces through which you can send or recieve a text message. Applications can subscribe to a JMS provider and can publish / post messages to the provider. Other applications that are also subscribed to the provider can receive these messages.
Now, there are two types of Messaging1) Point to Point (P2P)2) Publish - Subscribe (PS)
The first one indicates one to one communication between two applications, while the second one is like a bulletin board where multiple applications can subscribe and the messages will be published to all the subscribers.

So that is about the basics and to set the ball rolling! Next we will have some more details.Stopping for the day so that you wont be overloaded!
Stay Tuned

No comments: