activeMQ的jndi配置居然是在客户端配置的,消息的生产者和消费者都需要配置jndi.properties, 配置绑定相同主题或队列,除非使用“Dynamically creating destinations”方式。
从网上搜到一个解释:
[quote]2009/2/10 janylj <[hidden email]>:
>
> Hello,
>
> I tried ActiveMQ JNDI support. It seems to me only for testing, because the
> administrative objects are specified in the jndi.properties of client
> machine. There is no centralized place to manage the ConnectionFactory or
> Destination. And we could not control who could access them.
>
> Is my understanding correct or I miss something? Thank you very much.
You can use any JNDI provider you want. If you really want to store
the topic and queue objects in some remote JNDI server go right ahead,
noone is stopping you.
However the ActiveMQ JNDI provider is intended to avoid dependency on
some remote JNDI server and so by *design* it uses a local client side
configuration. This is perfectly fine for production use too :)
Another approach is using Spring to avoid depending on a remote,
distributed JNDI provider. But if you really wanna use a distributed
JNDI provider just pick one you want and put the ActiveMQ administered
objects (queues, topics and connection factories) in there. Pretty
much all J2EE containers come with some remote JNDI server
implementation.
--
James [/quote]
[url]http://activemq.apache.org/jndi-support.html[/url]
[url]http://activemq.2283324.n4.nabble.com/ActiveMQ-JNDI-support-only-for-testing-td2363888.html[/url]
从网上搜到一个解释:
[quote]2009/2/10 janylj <[hidden email]>:
>
> Hello,
>
> I tried ActiveMQ JNDI support. It seems to me only for testing, because the
> administrative objects are specified in the jndi.properties of client
> machine. There is no centralized place to manage the ConnectionFactory or
> Destination. And we could not control who could access them.
>
> Is my understanding correct or I miss something? Thank you very much.
You can use any JNDI provider you want. If you really want to store
the topic and queue objects in some remote JNDI server go right ahead,
noone is stopping you.
However the ActiveMQ JNDI provider is intended to avoid dependency on
some remote JNDI server and so by *design* it uses a local client side
configuration. This is perfectly fine for production use too :)
Another approach is using Spring to avoid depending on a remote,
distributed JNDI provider. But if you really wanna use a distributed
JNDI provider just pick one you want and put the ActiveMQ administered
objects (queues, topics and connection factories) in there. Pretty
much all J2EE containers come with some remote JNDI server
implementation.
--
James [/quote]
[url]http://activemq.apache.org/jndi-support.html[/url]
[url]http://activemq.2283324.n4.nabble.com/ActiveMQ-JNDI-support-only-for-testing-td2363888.html[/url]
本文深入探讨了ActiveMQ中JNDI配置的原理与实践,包括客户端配置、主题或队列的绑定方式及使用场景。特别强调了ActiveMQ JNDI提供者的本地客户端配置设计,以及如何通过Spring等工具避免远程JNDI依赖。
1090

被折叠的 条评论
为什么被折叠?



