Auryn
Auryn

Reputation: 1176

Wildfly Artemis ActiveMQ lookup fail

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

wildfly output on start:

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>

My exception:

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)

my Bean include:

@Inject
private JMSContext context;    
@Resource(mappedName = "java:jboss/activemq/queue/HELLOWORLDMDBQueue")
private Queue queue;

i also tried:

@Inject
private JMSContext context;    
@Resource(mappedName = "java:/activemq/queue/HELLOWORLDMDBQueue")
private Queue queue;

Did anyone has an idea what i did wrong?

Thanks for help

Upvotes: 0

Views: 712

Answers (1)

Justin Bertram
Justin Bertram

Reputation: 35038

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.

Upvotes: 1

Related Questions