HashMap<String, Object> transportConfig = new HashMap<String, Object>();
transportConfig.put(TransportConstants.SERVER_ID_PROP_NAME, configuration.getInVmId());
ServerLocator consumerLocator = new ServerLocatorImpl(false, new TransportConfiguration(InVMConnectorFactory.class.getName(), transportConfig));
HornetQRestLogger.LOGGER.debug("Created ServerLocator: " + consumerLocator);
if (configuration.getConsumerWindowSize() != -1)
{
consumerLocator.setConsumerWindowSize(configuration.getConsumerWindowSize());
}
ClientSessionFactory consumerSessionFactory = consumerLocator.createSessionFactory();
HornetQRestLogger.LOGGER.debug("Created ClientSessionFactory: " + consumerSessionFactory);
ServerLocator defaultLocator = new ServerLocatorImpl(false, new TransportConfiguration(InVMConnectorFactory.class.getName(), transportConfig));
ClientSessionFactory sessionFactory = defaultLocator.createSessionFactory();
LinkStrategy linkStrategy = new LinkHeaderLinkStrategy();
if (configuration.isUseLinkHeaders())
{
linkStrategy = new LinkHeaderLinkStrategy();