Hi Badal,
According to my study
There are two ways to develop Chat Application.
1.Using Sockets and Streams
2.Using JMS
Using Sockets guarantees the delivery of the message but this is often used because most of the firewalls block socket connections.
Using JMS for a chat application is an overkill because a simple chat application doesnt need
J2EE architecture and on top of that it effects the application performance