JMS Object Hierarchy

[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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值