Wildfly Artemis ActiveMQ查找失败 [英] Wildfly Artemis ActiveMQ lookup fail

查看:318
本文介绍了Wildfly Artemis ActiveMQ查找失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对que的查找失败。该que在wildfly中注册,并在开始时配置了ironjacamar.xml

My lookup for a que fail. The que is registered in the wildfly and configured with ironjacamar.xml

wildfly 输出:

Bound JCA AdminObject [java:jboss/activemq/queue/HELLOWORLDMDBQueue]

ironjacamar config:

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

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

Did anyone has an idea what i did wrong?

感谢您的帮助

推荐答案

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

It appears that you're attempting to use the admin object from the ActiveMQ 5.x JCA resource adapter to configure a JMS queue, but then you're using the ActiveMQ Artemis client to work with that queue. ActiveMQ 5.x and ActiveMQ Artemis are completely different client/server implementations. You can't mix them like that.

这篇关于Wildfly Artemis ActiveMQ查找失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆