gpt4 book ai didi

java - 正确部署后消息驱动 Bean 不使用消息

转载 作者:太空宇宙 更新时间:2023-11-04 12:50:06 25 4
gpt4 key购买 nike

我已经正确部署了 mdb,服务器日志显示我已经成功部署,但是我仍然无法在 jboss 容器中使用来自 websphere mq 的消息

我的 mdb 中的激活配置

@MessageDriven(
activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "hostName", propertyValue = "ip_address"),
@ActivationConfigProperty(propertyName = "port", propertyValue = "port"),
@ActivationConfigProperty(propertyName = "channel", propertyValue = "JAVA.CHANNEL"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "Q_PVF_BACKEND"),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
@ActivationConfigProperty(propertyName = "queueManager", propertyValue = "TEST_MRIS_IIB")
})
@ResourceAdapter(value="wmq.jmsra.rar")

Jboss 服务器日志

08:40:38,188 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "ikvEAR.ear"
08:40:38,192 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "ikvEJB.jar"
08:40:38,208 INFO [org.jboss.as.ejb3] (MSC service thread 1-2) JBAS014142: Started message driven bean 'mdb' with 'wmq.jmsra' resource adapter
08:40:38,277 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "ikvEAR.ear"

Standalone-full.xml

    ...
<mdb>
<resource-adapter-ref resource-adapter-name="wmq.jmsra.rar"/>
<bean-instance-pool-ref pool-name="mdb-wmq-strict-max-pool"/>
</mdb>
...
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
<resource-adapters>
<resource-adapter>
<archive>
wmq.jmsra.rar
</archive>
<transaction-support>NoTransaction</transaction-support>
<config-property name="logWriterEnabled">
true
</config-property>
<config-property name="traceLevel">
6
</config-property>
<config-property name="traceEnabled">
true
</config-property>
<connection-definitions>
<connection-definition class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl" jndi-name="java:/jboss/PVFConnectionFactory" pool-name="PVFConnectionFactory">
<config-property name="port">
port
</config-property>
<config-property name="channel">
SYSTEM.DEF.SVRCONN
</config-property>
<config-property name="hostName">
ip_address
</config-property>
<config-property name="transportType">
CLIENT
</config-property>
<config-property name="queueManager">
TEST_MRIS_IIB
</config-property>
</connection-definition>
</connection-definitions>
<admin-objects>
<admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/jboss/jobQueue" pool-name="jobQueue">
<config-property name="baseQueueManagerName">
TEST_MRIS_IIB
</config-property>
<config-property name="baseQueueName">
Q_MRES_PSDS_ALL_MSG
</config-property>
</admin-object>
<admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/jboss/backendQueue" pool-name="backendQueue">
<config-property name="baseQueueManagerName">
TEST_MRIS_IIB
</config-property>
<config-property name="baseQueueName">
Q_PVF_BACKEND
</config-property>
</admin-object>
</admin-objects>
</resource-adapter>
</resource-adapters>
</subsystem>

最佳答案

您可能需要命名您的资源适配器:

        <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">
<resource-adapters>
<resource-adapter id="wmq.jmsra.rar">
<archive>
wmq.jmsra.rar
</archive>

我很困惑:

Started message driven bean 'mdb' with 'wmq.jmsra' resource adapter

所有资源适配器的名称都应为“wmq.jmsra.rar”。 JBoss Web UI 上的部署页面是否显示您的 IBM MQ 资源适配器?

关于java - 正确部署后消息驱动 Bean 不使用消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37535449/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com