Examples of ServerLocator


Examples of org.hornetq.api.core.client.ServerLocator

      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();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.