Examples of BindingQuery


Examples of org.hornetq.api.core.client.ClientSession.BindingQuery

      {
         HornetQDestination jbd = (HornetQDestination)destination;

         if (jbd != null)
         {
            BindingQuery response = session.bindingQuery(jbd.getSimpleAddress());

            if (!response.isExists())
            {
               throw new InvalidDestinationException("Destination " + jbd.getName() + " does not exist");
            }
         }
View Full Code Here

Examples of org.hornetq.api.core.client.ClientSession.BindingQuery

         SimpleString autoDeleteQueueName = null;

         if (dest.isQueue())
         {
            BindingQuery response = session.bindingQuery(dest.getSimpleAddress());

            if (!response.isExists())
            {
               throw new InvalidDestinationException("Queue " + dest.getName() + " does not exist");
            }

            consumer = session.createConsumer(dest.getSimpleAddress(), coreFilterString, false);
         }
         else
         {
            BindingQuery response = session.bindingQuery(dest.getSimpleAddress());

            if (!response.isExists())
            {
               throw new InvalidDestinationException("Topic " + dest.getName() + " does not exist");
            }

            SimpleString queueName;
View Full Code Here

Examples of org.hornetq.api.core.client.ClientSession.BindingQuery

         throw new InvalidDestinationException("Cannot create a browser on a topic");
      }

      try
      {
         BindingQuery message = session.bindingQuery(new SimpleString(jbq.getAddress()));
         if (!message.isExists())
         {
            throw new InvalidDestinationException(jbq.getAddress() + " does not exist");
         }
      }
      catch (HornetQException e)
View Full Code Here

Examples of org.hornetq.api.core.client.ClientSession.BindingQuery

         throw new InvalidDestinationException("Not a temporary topic " + tempTopic);
      }

      try
      {
         BindingQuery response = session.bindingQuery(tempTopic.getSimpleAddress());

         if (!response.isExists())
         {
            throw new InvalidDestinationException("Cannot delete temporary topic " + tempTopic.getName() +
                                                  " does not exist");
         }

         if (response.getQueueNames().size() > 1)
         {
            throw new IllegalStateException("Cannot delete temporary topic " + tempTopic.getName() +
                                            " since it has subscribers");
         }
View Full Code Here

Examples of org.hornetq.api.core.client.ClientSession.BindingQuery

      else
      {
         topic = HornetQDestination.createTopic(topicName);
      }

      BindingQuery query = session.bindingQuery(topic.getSimpleAddress());

      if (!query.isExists())
      {
         return null;
      }
      else
      {
View Full Code Here

Examples of org.hornetq.api.core.client.ClientSession.BindingQuery

         clientSession.createQueue("a1", "q1", false);
         clientSession.createQueue("a1", "q2", false);
         clientSession.createQueue("a2", "q3", false);
         clientSession.createQueue("a2", "q4", false);
         clientSession.createQueue("a2", "q5", false);
         BindingQuery resp = clientSession.bindingQuery(new SimpleString("a"));
         List<SimpleString> queues = resp.getQueueNames();
         Assert.assertTrue(queues.isEmpty());
         resp = clientSession.bindingQuery(new SimpleString("a1"));
         queues = resp.getQueueNames();
         Assert.assertEquals(queues.size(), 2);
         Assert.assertTrue(queues.contains(new SimpleString("q1")));
         Assert.assertTrue(queues.contains(new SimpleString("q2")));
         resp = clientSession.bindingQuery(new SimpleString("a2"));
         queues = resp.getQueueNames();
         Assert.assertEquals(queues.size(), 3);
         Assert.assertTrue(queues.contains(new SimpleString("q3")));
         Assert.assertTrue(queues.contains(new SimpleString("q4")));
         Assert.assertTrue(queues.contains(new SimpleString("q5")));
         clientSession.close();
View Full Code Here

Examples of org.hornetq.api.core.client.ClientSession.BindingQuery

            session = (ClientSessionInternal)csf.createSession(user, password, false, true, true, true, 1);
         }

         if (forwardingAddress != null)
         {
            BindingQuery query = null;

            try
            {
               query = session.bindingQuery(forwardingAddress);
            }
            catch (Throwable e)
            {
               HornetQLogger.LOGGER.errorQueryingBridge(e, name);
               // This was an issue during startup, we will not count this retry
               retryCount--;

               scheduleRetryConnectFixedTimeout(100);
               return;
            }

            if (forwardingAddress.startsWith(BridgeImpl.JMS_QUEUE_ADDRESS_PREFIX) || forwardingAddress.startsWith(BridgeImpl.JMS_TOPIC_ADDRESS_PREFIX))
            {
               if (!query.isExists())
               {
                  HornetQLogger.LOGGER.errorQueryingBridge(forwardingAddress, retryCount);
                  scheduleRetryConnect();
                  return;
               }
            }
            else
            {
               if (!query.isExists())
               {
                  HornetQLogger.LOGGER.bridgeNoBindings(getName(), getForwardingAddress(), getForwardingAddress());
               }
            }
         }
View Full Code Here

Examples of org.hornetq.api.core.client.ClientSession.BindingQuery

      {
         HornetQDestination jbd = (HornetQDestination)destination;

         if (jbd != null)
         {
            BindingQuery response = session.bindingQuery(jbd.getSimpleAddress());

            if (!response.isExists())
            {
               throw new InvalidDestinationException("Destination " + jbd.getName() + " does not exist");
            }
         }
View Full Code Here

Examples of org.hornetq.api.core.client.ClientSession.BindingQuery

         SimpleString autoDeleteQueueName = null;

         if (dest.isQueue())
         {
            BindingQuery response = session.bindingQuery(dest.getSimpleAddress());

            if (!response.isExists())
            {
               throw new InvalidDestinationException("Queue " + dest.getName() + " does not exist");
            }

            consumer = session.createConsumer(dest.getSimpleAddress(), coreFilterString, false);
         }
         else
         {
            BindingQuery response = session.bindingQuery(dest.getSimpleAddress());

            if (!response.isExists())
            {
               throw new InvalidDestinationException("Topic " + dest.getName() + " does not exist");
            }

            SimpleString queueName;
View Full Code Here

Examples of org.hornetq.api.core.client.ClientSession.BindingQuery

         throw new InvalidDestinationException("Cannot create a browser on a topic");
      }

      try
      {
         BindingQuery message = session.bindingQuery(new SimpleString(jbq.getAddress()));
         if (!message.isExists())
         {
            throw new InvalidDestinationException(jbq.getAddress() + " does not exist");
         }
      }
      catch (HornetQException e)
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.