I am sending a message to ActiveMQ Artemis's queue with Qpid protocol,if I use below codes that can success
ConnectionFactory connectionFactory = new JmsConnectionFactory("amqp://localhost:5672");
But when I use this way that will fail:
Context initialContext = new InitialContext();
factory = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
and below code is jndi.properties:
java.naming.factory.initial=org.apache.qpid.jms.jndi.JmsInitialContextFactory
connectionFactory.ConnectionFactory=amqp://localhost:5672
queue.queue/myqueue=otd-aps
Could anyone help me resolve it? Thx!