Package org.hornetq.jms.client

Examples of org.hornetq.jms.client.HornetQDestination


      if (!added)
      {
         return false;
      }

      HornetQDestination destination = queues.get(queueName);
      if (destination == null)
      {
         // sanity check. internalCreateQueue should already have done this check
         throw new IllegalArgumentException("Queue does not exist");
      }
View Full Code Here


      {
         return false;
      }
      else
      {
         HornetQDestination destination = topics.get(topicName);

         if (destination == null)
         {
            // sanity check. internalCreateQueue should already have done this check
            throw new IllegalArgumentException("Queue does not exist");
View Full Code Here

      if (!added)
      {
         return false;
      }

      HornetQDestination destination = queues.get(queueName);
      if (destination == null)
      {
         // sanity check. internalCreateQueue should already have done this check
         throw new IllegalArgumentException("Queue does not exist");
      }
View Full Code Here

      {
         return false;
      }
      else
      {
         HornetQDestination destination = topics.get(topicName);

         if (destination == null)
         {
            // sanity check. internalCreateQueue should already have done this check
            throw new IllegalArgumentException("Queue does not exist");
View Full Code Here

   public void testEquals() throws Exception
   {
      String destinationName = RandomUtil.randomString();
      String address = HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + destinationName;
      HornetQDestination destination = (HornetQDestination) HornetQDestination.fromAddress(address);
      HornetQDestination sameDestination = (HornetQDestination) HornetQDestination.fromAddress(address);
      HornetQDestination differentDestination = (HornetQDestination) HornetQDestination.fromAddress(address + RandomUtil.randomString());

      Assert.assertFalse(destination.equals(null));
      Assert.assertTrue(destination.equals(destination));
      Assert.assertTrue(destination.equals(sameDestination));
      Assert.assertFalse(destination.equals(differentDestination));
View Full Code Here

   public void testFromAddressWithQueueAddressPrefix() throws Exception
   {
      String destinationName = RandomUtil.randomString();
      String address = HornetQDestination.JMS_QUEUE_ADDRESS_PREFIX + destinationName;
      HornetQDestination destination = (HornetQDestination) HornetQDestination.fromAddress(address);
      Assert.assertTrue(destination instanceof Queue);
      Assert.assertEquals(destinationName, ((Queue)destination).getQueueName());
   }
View Full Code Here

   public void testFromAddressWithTopicAddressPrefix() throws Exception
   {
      String destinationName = RandomUtil.randomString();
      String address = HornetQDestination.JMS_TOPIC_ADDRESS_PREFIX + destinationName;
      HornetQDestination destination = (HornetQDestination) HornetQDestination.fromAddress(address);
      Assert.assertTrue(destination instanceof Topic);
      Assert.assertEquals(destinationName, ((Topic)destination).getTopicName());
   }
View Full Code Here

   // Public --------------------------------------------------------

   public void testReference() throws Exception
   {
      HornetQDestination queue = (HornetQDestination) HornetQJMSClient.createQueue(RandomUtil.randomString());
      Reference reference = queue.getReference();

      DestinationObjectFactory factory = new DestinationObjectFactory();
      Object object = factory.getObjectInstance(reference, null, null, null);
      Assert.assertNotNull(object);
      Assert.assertTrue(object instanceof HornetQDestination);
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();

         ra.setConnectorClassName("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory");
View Full Code Here

            checkJNDI(jndi);
           
            if (internalCreateQueue(queueName, selectorString, durable))
            {

               HornetQDestination destination = queues.get(queueName);
               if (destination == null)
               {
                  // sanity check. internalCreateQueue should already have done this check
                  throw new IllegalArgumentException("Queue does not exist");
               }
View Full Code Here

TOP

Related Classes of org.hornetq.jms.client.HornetQDestination

Copyright © 2018 www.massapicom. 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.