Wildfly Artemis ActiveMQ 查找失败

Wildfly Artemis ActiveMQ lookup fail

我查找问题失败。 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;

有没有人知道我做错了什么?

感谢帮助

您似乎在尝试使用来自 ActiveMQ 5.x JCA 资源适配器的管理对象来配置 JMS 队列,但随后您正在使用 ActiveMQ Artemis 客户端来处理该队列。 ActiveMQ 5.x 和 ActiveMQ Artemis 是完全不同的 client/server 实现。你不能那样混合它们。