Package org.hornetq.api.core.client

Examples of org.hornetq.api.core.client.ClientSessionFactory.createSession()


      {
         server.start();

         ClientSessionFactory sf = locator.createSessionFactory();

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

         session.createQueue(PAGED_ADDRESS_A, PAGED_ADDRESS_A, true);

         session.createQueue(PAGED_ADDRESS_B, PAGED_ADDRESS_B, true);
View Full Code Here


         session.close();

         Assert.assertTrue(server.getPostOffice().getPagingManager().getPageStore(PAGED_ADDRESS_A).isPaging());
         Assert.assertTrue(server.getPostOffice().getPagingManager().getPageStore(PAGED_ADDRESS_B).isPaging());

         session = sf.createSession(null, null, false, true, true, false, 0);

         session.start();

         ClientConsumer consumerA = session.createConsumer(PAGED_ADDRESS_A);
View Full Code Here

         locator.setBlockOnDurableSend(true);
         locator.setBlockOnAcknowledge(true);

         final ClientSessionFactory sf = locator.createSessionFactory();

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

         session.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS, null, true);

         ClientProducer producer = session.createProducer(PagingTest.ADDRESS);
View Full Code Here

            public void run()
            {
               ClientSession sessionConsumer = null;
               try
               {
                  sessionConsumer = sf.createSession(false, false);
                  sessionConsumer.start();

                  ClientConsumer cons = sessionConsumer.createConsumer(ADDRESS);

                  for (int i = 0; i < numberOfMessages; i++)
View Full Code Here

         locator.setBlockOnDurableSend(true);
         locator.setBlockOnAcknowledge(true);

         ClientSessionFactory sf = locator.createSessionFactory();

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

         // note: if you want to change this, numberOfMessages has to be a multiple of NQUEUES
         int NQUEUES = 2;

         for (int i = 0; i < NQUEUES; i++)
View Full Code Here

         locator.setBlockOnDurableSend(true);
         locator.setBlockOnAcknowledge(true);

         ClientSessionFactory sf = locator.createSessionFactory();

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

         session.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS.concat("=1"), null, true);
         session.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS.concat("=2"), null, true);

         ClientProducer producer = session.createProducer(PagingTest.ADDRESS);
View Full Code Here

   protected void createQueue(String address, String queue) throws Exception
   {
      ServerLocator locator = createInVMNonHALocator();
      ClientSessionFactory sf = locator.createSessionFactory();
      ClientSession session = sf.createSession();
      session.createQueue(address, queue);
      session.close();
      sf.close();
      locator.close();
   }
View Full Code Here

      {

         server.start();
         ServerLocator locator = createInVMNonHALocator();
         ClientSessionFactory factory = locator.createSessionFactory();
         ClientSession session = factory.createSession(false, false, false);
         HornetQDestination queue = (HornetQDestination)HornetQJMSClient.createQueue("test");
         session.createQueue(queue.getSimpleAddress(), queue.getSimpleAddress(), true);
         session.close();

         HornetQResourceAdapter ra = new HornetQResourceAdapter();
View Full Code Here

      ServerLocator serverLocator =
               HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(
                                                                                     NettyConnectorFactory.class.getName(),
                                                                                     connectionParams));
      ClientSessionFactory sf = serverLocator.createSessionFactory();
      session = sf.createSession(false, !transactional, true);
      managementSession = sf.createSession(false, true, true);
      localSession = true;
   }

   public XmlDataImporter(String inputFile, String host, String port, boolean transactional) throws Exception
View Full Code Here

               HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(
                                                                                     NettyConnectorFactory.class.getName(),
                                                                                     connectionParams));
      ClientSessionFactory sf = serverLocator.createSessionFactory();
      session = sf.createSession(false, !transactional, true);
      managementSession = sf.createSession(false, true, true);
      localSession = true;
   }

   public XmlDataImporter(String inputFile, String host, String port, boolean transactional) throws Exception
   {
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.