【发布时间】:2019-04-29 02:49:42
【问题描述】:
我查找 que 失败。 que在wildfly中注册并使用ironjacamar.xml配置
wildfly 启动时输出:
Bound JCA AdminObject [java:jboss/activemq/queue/HELLOWORLDMDBQueue]
ironjacamar 配置:
<admin-object class-name="org.apache.activemq.command.ActiveMQQueue"
jndi-name="java:jboss/activemq/queue/HELLOWORLDMDBQueue">
<config-property name="PhysicalName">
activemq/queue/HELLOWORLDMDBQueue
</config-property>
</admin-object>
ra.xml:
<adminobject>
<adminobject-interface>javax.jms.Topic</adminobject-interface>
<adminobject-class>org.apache.activemq.command.ActiveMQTopic</adminobject-class>
<config-property>
<config-property-name>PhysicalName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
</adminobject>
我的例外:
Exception in thread "main" javax.jms.InvalidDestinationRuntimeException: Foreign destination:queue://activemq/queue/HELLOWORLDMDBQueue
at org.apache.activemq.artemis.jms.client.JmsExceptionUtils.convertToRuntimeException(JmsExceptionUtils.java:65)
at org.apache.activemq.artemis.jms.client.ActiveMQJMSProducer.send(ActiveMQJMSProducer.java:101)
at org.apache.activemq.artemis.jms.client.ActiveMQJMSProducer.send(ActiveMQJMSProducer.java:121)
我的 Bean 包括:
@Inject
private JMSContext context;
@Resource(mappedName = "java:jboss/activemq/queue/HELLOWORLDMDBQueue")
private Queue queue;
我也试过了:
@Inject
private JMSContext context;
@Resource(mappedName = "java:/activemq/queue/HELLOWORLDMDBQueue")
private Queue queue;
有人知道我做错了什么吗?
感谢您的帮助
【问题讨论】:
标签: jakarta-ee wildfly javabeans activemq-artemis