Examples of InvalidDestinationException


Examples of javax.jms.InvalidDestinationException

         {           
            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;

            if (subscriptionName == null)
            {
               // Non durable sub

               queueName = new SimpleString(UUID.randomUUID().toString());

               session.createTemporaryQueue(dest.getSimpleAddress(), queueName, coreFilterString);

               consumer = session.createConsumer(queueName, null, false);

               autoDeleteQueueName = queueName;
            }
            else
            {
               // Durable sub

               if (connection.getClientID() == null)
               {
                  throw new InvalidClientIDException("Cannot create durable subscription - client ID has not been set");
               }

               if (dest.isTemporary())
               {
                  throw new InvalidDestinationException("Cannot create a durable subscription on a temporary topic");
               }

               queueName = new SimpleString(HornetQDestination.createQueueNameForDurableSubscription(connection.getClientID(),
                                                                                               subscriptionName));
View Full Code Here

Examples of org.springframework.jms.InvalidDestinationException

    }
    if (ex instanceof javax.jms.InvalidClientIDException) {
      return new InvalidClientIDException((javax.jms.InvalidClientIDException) ex);
    }
    if (ex instanceof javax.jms.InvalidDestinationException) {
      return new InvalidDestinationException((javax.jms.InvalidDestinationException) ex);
    }
    if (ex instanceof javax.jms.InvalidSelectorException) {
      return new InvalidSelectorException((javax.jms.InvalidSelectorException) ex);
    }
    if (ex instanceof javax.jms.JMSSecurityException) {
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.