Package org.hornetq.api.core.client

Examples of org.hornetq.api.core.client.ClientSession.deleteQueue()


         ClientSessionFactory cf = createInVMFactory();
         ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
         session.createQueue(SecurityTest.addressA, SecurityTest.queueA, true);
         try
         {
            session.deleteQueue(SecurityTest.queueA);
            Assert.fail("should throw exception");
         }
         catch (HornetQException e)
         {
            Assert.assertEquals(HornetQException.SECURITY_EXCEPTION, e.getCode());
View Full Code Here


         securityRepository.addMatch(SecurityTest.addressA, roles);
         securityManager.addRole("auser", "arole");
         ClientSessionFactory cf = createInVMFactory();
         ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
         session.createQueue(SecurityTest.addressA, SecurityTest.queueA, false);
         session.deleteQueue(SecurityTest.queueA);
         session.close();
      }
      finally
      {
         if (server.isStarted())
View Full Code Here

         ClientSessionFactory cf = createInVMFactory();
         ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
         session.createQueue(SecurityTest.addressA, SecurityTest.queueA, false);
         try
         {
            session.deleteQueue(SecurityTest.queueA);
            Assert.fail("should throw exception");
         }
         catch (HornetQException e)
         {
            Assert.assertEquals(HornetQException.SECURITY_EXCEPTION, e.getCode());
View Full Code Here

         ClientConsumer consumer = s.createConsumer(new SimpleString(threadNum + MultiThreadRandomReattachTestBase.ADDRESS.toString()));

         consumer.close();
      }

      s.deleteQueue(new SimpleString(threadNum + MultiThreadRandomReattachTestBase.ADDRESS.toString()));

      s.close();
   }

   /*
 
View Full Code Here

      producer.close();

      consumer.close();

      session.deleteQueue(subName);

      session.close();
   }

   protected void doTestA(final ClientSessionFactory sf, final int threadNum) throws Exception
View Full Code Here

      int numberOfPages = addMessages(NUM_MESSAGES, 1024 * 1024);

      ServerLocator locator = createInVMNonHALocator();
      ClientSessionFactory sf = locator.createSessionFactory();
      ClientSession session = sf.createSession();
      session.deleteQueue(ADDRESS);

      System.out.println("NumberOfPages = " + numberOfPages);

      session.close();
      sf.close();
View Full Code Here

         throw new IllegalArgumentException("No sf at " + node);
      }

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

      session.deleteQueue(queueName);

      session.close();
   }

   protected void addConsumer(final int consumerID, final int node, final String queueName, final String filterVal) throws Exception
View Full Code Here

         Assert.assertNull(consumer1.receiveImmediate());

         consumer1.close();

         session1.deleteQueue(queueName1);

         session1.close();

         sf1.close();
View Full Code Here

         Assert.assertNull(consumer1.receiveImmediate());

         consumer1.close();

         session1.deleteQueue(queueName1);

         session1.close();

         sf1.close();
View Full Code Here

   {
      ClientSession session = locator.createSessionFactory().createSession(false, true, true);
      session.createQueue(address, queueName, false);
      Binding binding = server.getPostOffice().getBinding(queueName);
      Assert.assertNotNull(binding);
      session.deleteQueue(queueName);
      binding = server.getPostOffice().getBinding(queueName);
      Assert.assertNull(binding);
      session.close();
   }
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.