| Home J2EE Concepts JMS Java Language Contact Back Bookmark this Page | |
Some useful tips related to:
|
JMS API Building BlocksA typical JMS applications consists of following: |
|
A Connection Factory is used by a JMS client to create connection with the provider. Typically a connection factory is created using admin console. The code in client that instantiates connection factory looks like following:
A Destination represents the source or target of messages for a client. In point to point domain, destinations are called Queues & in publish subscriber domain, destinations are called Topics.
A Connection represents virtual connection with the provider. This concept is similar to JDBC connection. A Session could be thought of as a single threaded context for producing & consuming messages. Sessions can also be understood better if we compare them to JDBC sessions. Multiple sessions can be opened on single connection & closing a connection would result in close all of its sessions. A Message Producer is an object created by a session and used for sending messages to a destination. A Message Consumer is used for receiving messages sent by message producer. A Message typically consists of three parts: header, properties (optional) & body (optional). |
|
|
|
|