JMS(Jboss Messaging)的一点使用心得(六)Spring扩展应用-Message Bridge

开发者在线 Builder.com.cn 更新时间:2007-11-25作者:builder.com.cn 来源:来源网站

本文关键词: JBoss

相对于JbossMQ,Messaging中增加了Bridge的功能,可以把Message桥接到其他的JMS服务器中。具体的配置手顺请参见<http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.4.0.SP1/html/bridge.html>
在Messaging的包中也有相关的example.Messaging中的例子只是本机之间的Bridge,如果涉及到其他机器,则必须把<jboss-4.2.2.GAservermessagingdeployjms-ds.xml>中的RemoteJMSProvider如下设置:
  <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
     name
="jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider">
    
<attribute name="ProviderName">RemoteJMSProvider</attribute>
    
<attribute name="ProviderAdapterClass">
      org.jboss.jms.jndi.JNDIProviderAdapter
    
</attribute>
    
<!-- The combined connection factory -->
    
<attribute name="FactoryRef">XAConnectionFactory</attribute>
    
<!-- The queue connection factory -->
    
<attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
    
<!-- The topic factory -->
    
<attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
    
<!-- Uncomment to use HAJNDI to access JMS-->
    
<attribute name="Properties">
       java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
       java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
       java.naming.provider.url=otherhost:1099
    
</attribute>
注意FactoryRefQueueFactoryRefTopicFactoryRef中都没有“java:”,因为java:是表示本地服务的意思,如果写上了,就不能连接远程的JMS服务器了。

Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1901653

用户评论

  • 用户名
  • 评论内容