我的查找失败了。que已在通配符中注册并配置为ironjacamar.xml。
开始时通配符输出:
Bound JCA AdminObject [java:jboss/activemq/queue/HELLOWORLDMDBQueue]配置:
<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)我的豆包括:
@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;有人知道我做错了什么吗?
谢谢你的帮助
发布于 2018-11-27 14:56:56
您似乎正在尝试使用来自ActiveMQ 5.xJCA资源适配器的admin对象来配置resource,但接下来您将使用ActiveMQ Artemis客户机来处理该队列。ActiveMQ 5.x和ActiveMQ Artemis是完全不同的客户机/服务器实现。你不能那样把它们混在一起。
https://stackoverflow.com/questions/53498387
复制相似问题