Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2286
  
    OK.  I see now where this isn't being passed through when used for a JMS 
connection factory, although using the property in the URL for a 
`ServerLocator` directly does work.  You should add a test to 
SimpleJNDIClientTest, e.g.:
    
    ```
       @Test
       public void testUseTopologyForLoadBalancing() throws NamingException {
          Hashtable<String, String> props = new Hashtable<>();
          props.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
          props.put("connectionFactory.ConnectionFactory", 
"vm://0?useTopologyForLoadBalancing=false");
          Context ctx = new InitialContext(props);
    
          ConnectionFactory connectionFactory = (ConnectionFactory) 
ctx.lookup("ConnectionFactory");
          
assertFalse(((ActiveMQConnectionFactory)connectionFactory).getServerLocator().getUseTopologyForLoadBalancing());
       }
    ```


---

Reply via email to