首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >将Websphere 5.1 MDB连接到JBoss MQ队列

将Websphere 5.1 MDB连接到JBoss MQ队列
EN

Stack Overflow用户
提问于 2011-12-21 15:57:01
回答 1查看 662关注 0票数 2

我正在尝试将运行jboss3.x的系统升级到jboss5.1。系统使用MDB监听WebSphere MQ中的队列,因此“消息驱动”通过“配置名称”连接到容器/“调用代理绑定”-我想这是连接到远程队列的标准方式。

JBoss 5.1的问题在于jboss_5_1.xsd没有configuration-nameinvoker-proxy-binding。到目前为止,我发现所有关于连接JBoss 5.1MDB连接到远程队列的示例都没有使用jboss_5_1.xsd,而是使用了jboss_5_0.dtd

使用jboss_5_0.dtd会错过什么,在5.1中应该如何配置?

EN

回答 1

Stack Overflow用户

发布于 2013-02-07 23:54:55

嗯,我知道这是一个有点老的问题,但不管怎样:我使用ejb3-interceptors-aop.xml中定义的激活配置让它在5.1上工作

代码语言:javascript
运行
复制
<domain name="zzz.ejb.mdb.MessageReceiver" extends="Message Driven Bean" inheritBindings="true">
     <!-- annotation must be documented on one line without CR/LF -->
     <annotation expr="!class(@org.jboss.ejb3.annotation.DefaultActivationSpecs)">
                        @org.jboss.ejb3.annotation.DefaultActivationSpecs ({ @javax.ejb.ActivationConfigProperty(propertyName = "messagingType", propertyValue="javax.jms.MessageListener"), @javax.ejb.ActivationConfigProperty(propertyName = "destinationType",propertyValue = "javax.jms.Queue"), @javax.ejb.ActivationConfigProperty(propertyName = "destination", propertyValue = "zzz/jms/LocalQueue"), @javax.ejb.ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "true"), @javax.ejb.ActivationConfigProperty(propertyName = "queueManager", propertyValue = "ZZZ.QMGR"), @javax.ejb.ActivationConfigProperty(propertyName = "hostName", propertyValue = "172.21.100.10"), @javax.ejb.ActivationConfigProperty(propertyName = "port", propertyValue = "1415"), @javax.ejb.ActivationConfigProperty(propertyName = "transportType", propertyValue = "CLIENT"), @javax.ejb.ActivationConfigProperty(propertyName = "maxPoolDepth", propertyValue = "1")})
    </annotation>
</domain>

请注意,注释在一行中。

此外,我还为队列定义了一个mbean (如下所示):

代码语言:javascript
运行
复制
        <mbean code="org.jboss.resource.deployment.AdminObject" name="jboss.jca:service=WASDestination,name=zzz/jms/LocalQueue">
            <attribute name="JNDIName">zzz/jms/LocalQueue</attribute>
            <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'</depends>
            <attribute name="Type">javax.jms.Queue</attribute>
            <attribute name="Properties">
                    baseQueueManagerName=ZZZ.QMGR
                    baseQueueName=ZZZ.QUEUE
            </attribute>
    </mbean>

我希望这能帮到你

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8586597

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档