Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0.0
-
None
Description
Both in ActiveMQ OpenWire and ActiveMQ Artemis Core clients with their respective JMS InitialContextFactory implementations it is possible to set the connection url as the naming provider url property directly, creating default connection factories with that connection url.
This is very convenient as well some third party systems annoyingly have also been built around that, making transition to Qpid JMS client from older ActiveMQ Openwire or Artemis less straightforward where we want to migrate fully to AMQP protocol with the brokers from all systems.
e.g.
ActiveMQ 5.x Openwire:
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.provider.url=tcp://hostname:61616
ActiveMQ Artemis Core
java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
java.naming.provider.url=tcp://localhost:5445
Intent is to support the same, for qpid-jms.
e.g.
java.naming.factory.initial=org.apache.qpid.jms.jndi.JmsInitialContextFactory
java.naming.provider.url=amqps://localhost:5672
or
java.naming.factory.initial=org.apache.qpid.jms.jndi.JmsInitialContextFactory
java.naming.provider.url=failover:(amqps://host1:5672,amqps://host2:5672)
Followed by e.g. lookup of the "ConnectionFactory" default factory created on the Context:
ConnectionFactory connectionFactory = (ConnectionFactory) context.lookup("ConnectionFactory");