Package org.hornetq.core.client.impl

Examples of org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession()


         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
         {
View Full Code Here


   public void testCloseOneSessionOnGC() throws Exception
   {
      ClientSessionFactoryImpl sf = createInVMFactory();

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

      WeakReference<ClientSession> wses = new WeakReference<ClientSession>(session);

      Assert.assertEquals(1, server.getRemotingService().getConnections().size());
View Full Code Here

   public void testCloseSeveralSessionOnGC() throws Exception
   {
      ClientSessionFactoryImpl sf = createInVMFactory();

      ClientSession session1 = sf.createSession(false, true, true);
      ClientSession session2 = sf.createSession(false, true, true);
      ClientSession session3 = sf.createSession(false, true, true);

      Assert.assertEquals(1, server.getRemotingService().getConnections().size());
View Full Code Here

   public void testCloseSeveralSessionOnGC() throws Exception
   {
      ClientSessionFactoryImpl sf = createInVMFactory();

      ClientSession session1 = sf.createSession(false, true, true);
      ClientSession session2 = sf.createSession(false, true, true);
      ClientSession session3 = sf.createSession(false, true, true);

      Assert.assertEquals(1, server.getRemotingService().getConnections().size());

      WeakReference<ClientSession> ref1 = new WeakReference<ClientSession>(session1);
View Full Code Here

   {
      ClientSessionFactoryImpl sf = createInVMFactory();

      ClientSession session1 = sf.createSession(false, true, true);
      ClientSession session2 = sf.createSession(false, true, true);
      ClientSession session3 = sf.createSession(false, true, true);

      Assert.assertEquals(1, server.getRemotingService().getConnections().size());

      WeakReference<ClientSession> ref1 = new WeakReference<ClientSession>(session1);
      WeakReference<ClientSession> ref2 = new WeakReference<ClientSession>(session2);
View Full Code Here

      assertEquals(1, divertNames.length);
      assertEquals(name, divertNames[0]);
     
      // check that a message sent to the address is diverted exclusively
      ClientSessionFactory csf = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName()));
      ClientSession session = csf.createSession();

      String divertQueue = RandomUtil.randomString();
      String queue = RandomUtil.randomString();
      session.createQueue(forwardingAddress, divertQueue);
      session.createQueue(address, queue);
View Full Code Here

      checkNoResource(ObjectNameBuilder.DEFAULT.getBridgeObjectName(name));
      assertEquals(0, serverControl.getBridgeNames().length);

      ClientSessionFactory csf = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName()));
      ClientSession session = csf.createSession();

      session.createQueue(sourceAddress, sourceQueue);
      session.createQueue(targetAddress, targetQueue);

      serverControl.createBridge(name,
View Full Code Here

   }

   public void start() throws Exception
   {
      ClientSessionFactoryImpl sf = (ClientSessionFactoryImpl) HornetQClient.createClientSessionFactory(new TransportConfiguration(NettyConnectorFactory.class.getName()));
      clientSession = sf.createSession(ConfigurationImpl.DEFAULT_CLUSTER_USER,
                                       ConfigurationImpl.DEFAULT_CLUSTER_PASSWORD,
                                       false,
                                       true,
                                       true,
                                       false,
View Full Code Here

      csf.setClientFailureCheckPeriod(PingTest.CLIENT_FAILURE_CHECK_PERIOD);
      csf.setConnectionTTL(PingTest.CLIENT_FAILURE_CHECK_PERIOD * 2);

      Listener clientListener = new Listener();

      ClientSession session = csf.createSession(false, true, true);

      Assert.assertEquals(1, csf.numConnections());

      session.addFailureListener(clientListener);

View Full Code Here

         locator.setConfirmationWindowSize(1024 * 1024);

         ClientSessionFactoryImpl sf = (ClientSessionFactoryImpl) locator.createSessionFactory();


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

         Failer failer = startFailer(1000, session);

         do
         {
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.