请问mdb问题

jboss下的消息驱动bean可以消费远程的activeMQ队列么?


<mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.mq:service=JMSProviderLoader,name=RemoteJMSProvider,server=remotehost">
<attribute name=
"ProviderName">RemoteJMSProvider</attribute>
<attribute name=
"ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
<!-- The connection factory -->
<attribute name=
"FactoryRef">UIL2XAConnectionFactory</attribute>
<!-- The queue connection factory -->
<attribute name=
"QueueFactoryRef">UIL2XAConnectionFactory</attribute>
<!-- The topic factory -->
<attribute name=
"TopicFactoryRef">UIL2XAConnectionFactory</attribute>
<!-- Connect to JNDI on the host
"the-remote-host-name" port 1099-->
<attribute name=
"Properties">
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jnp.interfaces
java.naming.provider.url=192.168.1.101:1099
</attribute>
</mbean>

这是我找到的,看起来是监听远程jboss队列的,activeMQ的怎么配置呢?

mdb天生就是分布式的,天生就可以远程消费。

你找一个完整的MDB案例就知道,分两个部分:在MDB程序中配置queue的JNDI和在MDB服务器如JBOSS ActiveMQ中配置这个JNDI的Queue