8.6 ActiveMQ 和 JNDI

博客已搬家,更好阅读体验,猛戳 http://www.jack-yin.com/english/translation/activemq-in-action/1598.html

 

8.6 ActiveMQ and JNDI

8.6 ActiveMQ 和 JNDI

 

So far this chapter has demonstrated how to configure the ActiveMQ administrative

objects (the ConnectionFactory and Destination objects) for each container that

was covered. This entailed a style of configuration for the ConnectionFactory and

Destination objects that was specific to each container so that they were made accessible

via JNDI to the sample web application. The sample web application then used Spring

to look up those objects via JNDI in order to interact with ActiveMQ. The following listing

shows an example of the Spring JNDI lookup

 

到目前位置,本章内中已经阐述了如何为本章中涉及到的每一个web容器配置ActiveMQ的管理对象

(ConnectionFactory对象和Destination对象).这就需要一种配置方式,为每一种web容器配置

ConnectionFactory对象和Destination对象,以便容器中的示例程序可以通过JNDI来访问那两个

对象.示例web程序中使用Spring通过JNDI来查找这些对象以便能够跟ActiveMQ交互.下面的代码

清单是Spring的JNDI查找示例配置:

 

...............................

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值