jmsConfig.setPubSubDomain(pubSubDomain);
jmsConfig.setPubSubNoLocal(true);
boolean useJndi = endpoint.getJmsVariant().equals(JMSURIConstants.JNDI);
if (useJndi) {
// Setup Destination jndi destination resolver
final JndiDestinationResolver jndiDestinationResolver = new JndiDestinationResolver();
jndiDestinationResolver.setJndiTemplate(jt);
jmsConfig.setDestinationResolver(jndiDestinationResolver);
jmsConfig.setTargetDestination(endpoint.getDestinationName());
jmsConfig.setReplyDestination(endpoint.getReplyToName());
} else {
// Use the default dynamic destination resolver