endpoint.setJndiInitialContextFactory("org.apache.activemq.jndi.ActiveMQInitialContextFactory");
endpoint.setJndiURL(broker.getBrokerURL());
endpoint.setJndiConnectionFactoryName("ConnectionFactory");
final JMSConfiguration jmsConfig = new JMSConfiguration();
JndiHelper jt = new JndiHelper(JMSOldConfigHolder.getInitialContextEnv(endpoint));
JNDIConfiguration jndiConfig = new JNDIConfiguration();
jndiConfig.setJndiConnectionFactoryName(endpoint.getJndiConnectionFactoryName());
jmsConfig.setJndiTemplate(jt);
jmsConfig.setJndiConfig(jndiConfig);