I am in the process of migrating a codebase from Wildfly 10 / Artemis 1.1 to
Wildfly 14 / Artemic 2.6.3.

I was hoping someone could assist me on what I'm not understanding about not
being able to lookup a queue I am adding in my code.

 InitialContext jndi = new InitialContext();
 ConnectionFactory cf = (ConnectionFactory)
jndi.lookup("ConnectionFactory");
 connection = cf.createConnection();
 session = (QueueSession) connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
 Queue managementQueue =
ActiveMQJMSClient.createQueue("activemq.management");
 QueueRequestor requestor = new QueueRequestor(session, managementQueue);
 connection.start();
        
  Message m = session.createMessage();
        
  JMSManagementHelper.putOperationInvocation(m, ResourceNames.BROKER,
"createQueue", "abc","queue/abc");

This appears to successfully add the abc queue. 

If i run:
 JMSManagementHelper.putAttribute(m, ResourceNames.BROKER, "queueNames")
 JMSManagementHelper.getResult(requestor.request(m))

I can see my queue (queue/abc) in the list of queue names.

Is it possible for me to lookup my queue through the initial context?

I am trying to do variations of jndi.lookup("queue/abc") to no avail.

Any help would be greatly appreciated.

Thanks



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Reply via email to