1
votes

I'm new to ActiveMQ and I'm trying to understand how the ActiveMQ naming service works. If I have understood correctly, To be able to use activeMQ broker it is necessary to pass by JNDI to retrieve the connectionFactory and the destinations (topic, queue).

ActiveMQ provides a naming service whose location is defined through the java.naming.provider.url variable in the jndi.properties file. Reading the class code ActiveMQInitialContextFactory and ActiveMQConnectionFactory I noticed that the variable java.naming.provider.url (Context.PROVIDER_URL) is rather used to initiate the value of BrokerURL which is used to locate the JMS broker and not to locate naming service.

My questions are as follows:

  1. Are my sentences and my reasoning correct?
  2. ActiveMQ does not really provide a naming service implementation?
  3. In the case of activeMQ, the objects managed by JNDI are not really created provider side? Rather, they are created JMS client side?
1
you ask for JNDI or HASH ? - Halayem Anis

1 Answers

0
votes

To the best of my knowledge, ActiveMQ does not provide a server-side naming service. That is, there is no separate service listening on some specific port, that just responds to name queries. Usually when using JNDI lookups to locate ActiveMQ brokers or destinations, this will be in an application server context, where the application server provides the JNDI infrastructure.

Outside the application server context, my experience is that developers typically instantiate ActiveMQConnectionFactory and set its properties directly, without using JNDI.