Package org.hornetq.api.core.client

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


   public void testDeleteQueueNotExist() throws Exception
   {
      ClientSession session = locator.createSessionFactory().createSession(false, true, true);
      try
      {
         session.deleteQueue(queueName);
         Assert.fail("should throw exception");
      }
      catch (HornetQException e)
      {
         Assert.assertEquals(HornetQException.QUEUE_DOES_NOT_EXIST, e.getCode());
View Full Code Here


         SimpleString topicName = new SimpleString(name);
         ClientSession.QueueQuery query = session.queueQuery(topicName);
         if (query.isExists())
         {
            session.deleteQueue(topicName);
         }
         else
         {
            throw new WebApplicationException(Response.status(405).type("text/plain").entity("Topic '" + name + "' does not exist").build());
         }
View Full Code Here

      ClientSession session = null;
      try
      {
         session = sessionFactory.createSession();

         session.deleteQueue(subscriptionName);
      }
      catch (HornetQException e)
      {
      }
      finally
View Full Code Here

      ClientSession session = null;
      try
      {
         session = sessionFactory.createSession();

         session.deleteQueue(subscriptionName);
      }
      catch (HornetQException e)
      {
      }
      finally
View Full Code Here

         SimpleString queueName = new SimpleString(name);
         ClientSession.QueueQuery query = session.queueQuery(queueName);
         if (query.isExists())
         {
            session.deleteQueue(queueName);
         }
         else
         {
            throw new WebApplicationException(Response.status(405).type("text/plain").entity("Queue '" + name + "' does not exist").build());
         }
View Full Code Here

    public void stop() throws Exception {
        shutdown.set(true);
        if (session != null)
            session.close();
        ClientSession coreSession = sf.createSession(false, false, false);
        coreSession.deleteQueue(QUEUE_EXAMPLE_QUEUE);
        coreSession.close();
    }

    @Override
    public void sendMessage(String txt) throws Exception {
View Full Code Here

         msg.acknowledge();
      }

      consumer.close();

      session.deleteQueue("q1");

      session.deleteQueue("q2");

      session.close();
View Full Code Here

      consumer.close();

      session.deleteQueue("q1");

      session.deleteQueue("q2");

      session.close();

      locator.close();
View Full Code Here

         msg.acknowledge();
      }

      consumer.close();

      session.deleteQueue("q1");

      session.deleteQueue("q2");

      session.close();
View Full Code Here

      consumer.close();

      session.deleteQueue("q1");

      session.deleteQueue("q2");

      session.close();

      locator.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.