Topic
  • 1 reply
  • Latest Post - ‏2017-06-12T14:37:24Z by fjb_saper
akul671
akul671
1 Post

Pinned topic Can't lookup a JMS Queue on a remote IBM MQ server from LIberty

‏2017-06-09T08:52:41Z | jms liberty wmq

In my WebSphere Liberty `server.xml` I have defined a JMS configuration to access JMS queues residing on a remote WebSphere MQ server.

        <featureManager>
           <feature>wmqJmsClient-1.1</feature>
        </featureManager>
        <jmsConnectionFactory
            jndiName="jms/myConnectionFactory">
        <properties.wmqJms
                transportType="CLIENT"
                hostName="${wmq.host}"
                port="${wmq.port}"
                channel="${wmq.channel}"
                queueManager="${wmq.queue_manager}"/>
            <containerAuthData
                user="${wmq.user}"
                password="${wmq.password}"/>
        </jmsConnectionFactory>
    
       <jmsQueue jndiName="jms/myQueue">
            <properties.wmqJms
                baseQueueName="${wmq.basequeue}"
                baseQueueManagerName="${wmq.queue_manager}"/>
       </jmsQueue>

(All the variables have some correct values)

Now in the code I have the following resources injected:

    @Resource(name="jms/myConnectionFactory")
    private ConnectionFactory myFactory;
    
    @Resource(name="jms/myQueue")
    Queue myQueue;

I observe that myFactory gets created successfully. However myQueue fails to be created with the message:

The server was unable to find the jms/myQueue default binding with the javax.jms.Queue type for the java:comp/env/jms/myQueue reference.

What should I change so the lookup does not fail? I can't see any evident problem in the config and the code.

 

  • fjb_saper
    fjb_saper
    240 Posts

    Re: Can't lookup a JMS Queue on a remote IBM MQ server from LIberty

    ‏2017-06-12T14:37:24Z  

    What is the linked exception or the cause for this exception? Did you get a reason code?

    And remember you can only get messages from a queue that is a queue local to the queue manager you are connected to...