WMQ 7.5 的 resourceAdapter 配置属性采用默认值而不是指定的配置

resourceAdapter config properties for WMQ 7.5 taking defaults instead of specified configs

我有一个用于 Websphere MQ 7.5 的资源适配器

             <resource-adapter id="wmq.jmsra.rar">
                <archive>
                    wmq.jmsra.rar
                </archive>
                <transaction-support>NoTransaction</transaction-support>
                <connection-definitions>
                    <connection-definition class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl" jndi-name="java:/ctm/ConnectionFactory" use-java-context="true" pool-name="ConnectionFactory">
                         <config-property name="hostName">
                            devel.comp.net
                        </config-property>

                        <config-property name="username">
                            mqm
                        </config-property>
                        <config-property name="channel">
                            COMP.DIR.SVRCONN
                        </config-property>
                        <config-property name="password">
                            mqm
                        </config-property>
                        <config-property name="transportType">
                            CLIENT
                        </config-property>
                        <config-property name="queueManager">
                            devel.queue.manager
                        </config-property>
                        <config-property name="port">
                            1414
                        </config-property>        
                        <security>
                            <application/>
                        </security>
                    </connection-definition>
                </connection-definitions>

如果我将端口号更改为 2414,那么它会选择这些属性,但如果我不更改端口号,它默认为 1414 localhost 和 queumanager name '',就像采用默认值一样。谁能告诉我这是怎么回事。

一旦我将端口号从 2414 恢复为 1414,它就会开始使用默认值,当我将其改回 2414 时,它会正确使用主机名和队列管理器名称。

谢谢

我无法弄清楚端口更改如何以及为什么会导致加载属性。相反,我在 standlaone-full.xml

中使用了系统属性
<system-properties>
        <property name="websphere.hostName" value="devel.comps.net"/>
        <property name="websphere.port" value="1414"/>
        <property name="websphere.channel" value="BLOBBER.DIR.SVRCONN"/>
        <property name="websphere.transportType" value="CLIENT"/>
        <property name="websphere.queueManager" value="devel.queue.manager"/>

并启用它

 <subsystem xmlns="urn:jboss:domain:ee:3.0">            
      <jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement>
</subsystem>

然后使用 ejb-jar.xml 来确定我需要使用哪些属性

     <message-driven>
                  <ejb-name>MyAppInboundBean</ejb-name>
                  <messaging-type>javax.jms.MessageListener</messaging-type>
                  <transaction-type>Container</transaction-type>
                  <message-destination-type>javax.jms.Queue</message-destination-type>
                  <activation-config>
                      <activation-config-property>
                          <activation-config-property-name>
                              destinationType
                          </activation-config-property-name>
                          <activation-config-property-value>
                              javax.jms.Queue
                          </activation-config-property-value>
                      </activation-config-property>
                      <activation-config-property>
                          <activation-config-property-name>
                              destination
                          </activation-config-property-name>
                          <activation-config-property-value>
                              java:/myapp/FromCTM
                          </activation-config-property-value>
                      </activation-config-property>
 <activation-config-property>
                      <activation-config-property-name>
                          hostName
                      </activation-config-property-name>
                      <activation-config-property-value>${websphere.hostName}</activation-config-property-value>
                  </activation-config-property>
                  <activation-config-property>
                      <activation-config-property-name>
                          queueManager
                      </activation-config-property-name>
                      <activation-config-property-value>${websphere.queueManager}</activation-config-property-value>
                  </activation-config-property>