if (jmsConfig.isUsingEndpointInfo()) {
JndiTemplate jt = new JndiTemplate();
jt.setEnvironment(JMSOldConfigHolder.getInitialContextEnv(endpoint));
boolean pubSubDomain = false;
pubSubDomain = endpoint.getJmsVariant().equals(JMSURIConstants.TOPIC);
JNDIConfiguration jndiConfig = new JNDIConfiguration();
jndiConfig.setJndiConnectionFactoryName(endpoint.getJndiConnectionFactoryName());
jmsConfig.setJndiTemplate(jt);
jmsConfig.setJndiConfig(jndiConfig);
jmsConfig.setExplicitQosEnabled(true);
jmsConfig.setPubSubDomain(pubSubDomain);
jmsConfig.setPubSubNoLocal(true);