Package org.hornetq.core.client.impl

Examples of org.hornetq.core.client.impl.ClientSessionFactoryImpl


   }

   protected void initDefaults()
   {
      if (sessionFactory == null)
         sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName()));
      if (consumerSessionFactory == null) consumerSessionFactory = sessionFactory;

      if (timeoutTask == null) throw new RuntimeException("TimeoutTask is not set");
   }
View Full Code Here


      defaultSettings.setDuplicatesAllowed(configuration.isDupsOk());
      defaultSettings.setDurableSend(configuration.isDefaultDurableSend());

      HashMap<String, Object> transportConfig = new HashMap<String, Object>();
      transportConfig.put(TransportConstants.SERVER_ID_PROP_NAME, configuration.getInVmId());
      ClientSessionFactory consumerSessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName(), transportConfig));
      if (configuration.getConsumerWindowSize() != -1)
      {
         consumerSessionFactory.setConsumerWindowSize(configuration.getConsumerWindowSize());
      }

      ClientSessionFactory sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName(), transportConfig));

      LinkStrategy linkStrategy = new LinkHeaderLinkStrategy();
      if (configuration.isUseLinkHeaders())
      {
         linkStrategy = new LinkHeaderLinkStrategy();
View Full Code Here

    *
    * @return the ClientSessionFactory.
    */
   public static ClientSessionFactory createClientSessionFactory()
   {
      return new ClientSessionFactoryImpl();
   }
View Full Code Here

    * @param other The ClientSessionFactory to copy
    * @return The new ClientSessionFactory
    */
   public static ClientSessionFactory createClientSessionFactory(final ClientSessionFactory other)
   {
      return new ClientSessionFactoryImpl(other);
   }
View Full Code Here

    * @param discoveryPort The port to use for discovery.
    * @return The ClientSessionFactory.
    */
   public static ClientSessionFactory createClientSessionFactory(final String discoveryAddress, final int discoveryPort)
   {
      return new ClientSessionFactoryImpl(discoveryAddress, discoveryPort);
   }
View Full Code Here

    * @param staticConnectors The list of TransportConfiguration's to use.
    * @return The ClientSessionFactory.
    */
   public static ClientSessionFactory createClientSessionFactory(final List<Pair<TransportConfiguration, TransportConfiguration>> staticConnectors)
   {
      return new ClientSessionFactoryImpl(staticConnectors);
   }
View Full Code Here

    * @return The ClientSessionFactory.
    */
   public static ClientSessionFactory createClientSessionFactory(final TransportConfiguration connectorConfig,
                                   final TransportConfiguration backupConnectorConfig)
   {
      return new ClientSessionFactoryImpl(connectorConfig, backupConnectorConfig);
   }
View Full Code Here

    * @param connectorConfig The TransportConfiguration of the server.
    * @return The ClientSessionFactory.
    */
   public static ClientSessionFactory createClientSessionFactory(final TransportConfiguration connectorConfig)
   {
      return new ClientSessionFactoryImpl(connectorConfig);
   }
View Full Code Here

      for (int its = 0; its < numIts; its++)
      {
         RandomReattachTest.log.info("####" + getName() + " iteration #" + its);
         start();

         ClientSessionFactoryImpl sf = (ClientSessionFactoryImpl) HornetQClient.createClientSessionFactory(new TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory"));

         sf.setReconnectAttempts(-1);
         sf.setConfirmationWindowSize(1024 * 1024);

         ClientSession session = sf.createSession(false, false, false);

         Failer failer = startFailer(1000, session);

         do
         {
            runnable.run(sf);
         }
         while (!failer.isExecuted());

         session.close();

         Assert.assertEquals(0, sf.numSessions());

         Assert.assertEquals(0, sf.numConnections());

         stop();
      }
   }
View Full Code Here

TOP

Related Classes of org.hornetq.core.client.impl.ClientSessionFactoryImpl

Copyright © 2018 www.massapicom. 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.