[img]/upload/attachment/113189/fe0d758d-1209-3e2c-8598-caa74c11834d.bmp[/img]
Main JMS Objects
● Connection factory
An administrated object you use to create JMS connections. Connection factories are obtained (looked up) from the JNDI.
● Connection
The connection is a factory for session objects.
● Session
A single-threaded context for sending and receiving messages. Using the session you can create a:
○ Message producer
An object created by the session used to send messages to a destination.
○ Message consumer
An object created by the session used to receive messages sent to a destination.
○ Message
The messages are the actual information exchanged by JMS clients.
● Destinations
The destination is an administered object that encapsulates the identity of a message destination. The destination messaging model could be:
○ Point-to-point (queue destination)
Use it to send messages that only one specified consumer can receive, that is, “one-to-one” message delivery.
○ Publish-subscribe (topic destination)
Use it to send messages to a group of consumers, that is, “one-to-many” message delivery. The model also allows you to create durable subscribers, which enable you to get a message sent to this destination while the consumer was not active.
Destination objects are set up as administered objects and then retrieved by the JMS client at runtime using JNDI instead of being directly instantiated. The JMS Provider also offers you a way to dynamically instantiate temporary destinations.
Main JMS Objects
● Connection factory
An administrated object you use to create JMS connections. Connection factories are obtained (looked up) from the JNDI.
● Connection
The connection is a factory for session objects.
● Session
A single-threaded context for sending and receiving messages. Using the session you can create a:
○ Message producer
An object created by the session used to send messages to a destination.
○ Message consumer
An object created by the session used to receive messages sent to a destination.
○ Message
The messages are the actual information exchanged by JMS clients.
● Destinations
The destination is an administered object that encapsulates the identity of a message destination. The destination messaging model could be:
○ Point-to-point (queue destination)
Use it to send messages that only one specified consumer can receive, that is, “one-to-one” message delivery.
○ Publish-subscribe (topic destination)
Use it to send messages to a group of consumers, that is, “one-to-many” message delivery. The model also allows you to create durable subscribers, which enable you to get a message sent to this destination while the consumer was not active.
Destination objects are set up as administered objects and then retrieved by the JMS client at runtime using JNDI instead of being directly instantiated. The JMS Provider also offers you a way to dynamically instantiate temporary destinations.