【问题标题】:Connecting JBoss 5.1 MDBs to Websphere MQ queues将 JBoss 5.1 MDB 连接到 Websphere MQ 队列
【发布时间】:2012-01-25 01:47:33
【问题描述】:

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

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

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

【问题讨论】:

    标签: jakarta-ee jboss5.x ibm-mq message-driven-bean


    【解决方案1】:

    嗯,我知道这是一个有点老的问题,但无论如何:我使用 ejb3-interceptors-aop.xml 中定义的激活配置在 5.1 上运行它

    <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(像这样):

            <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>
    

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-06
      • 2018-12-17
      • 1970-01-01
      • 2012-06-05
      • 2012-03-08
      • 2012-10-05
      相关资源
      最近更新 更多