Package javax.jms

Examples of javax.jms.InvalidDestinationException


         throw new IllegalStateException("Session is closed");
      }

      if (jmsDestination == null)
      {
         throw new InvalidDestinationException("null destination");
      }

      if (jmsDestination.isTopic())
      {
         throw new IllegalStateException("Cannot browse a topic");
View Full Code Here


   public MessageProducer createProducer(Destination d) throws JMSException
   {
      if (d != null && !(d instanceof JBossDestination))
      {
         throw new InvalidDestinationException("Not a JBossDestination:" + d);
      }
          
      ProducerDelegate producerDelegate = delegate.createProducerDelegate((JBossDestination)d);
      return new JBossMessageProducer(producerDelegate);
   }
View Full Code Here

   public MessageConsumer createConsumer(Destination d, String messageSelector, boolean noLocal)
         throws JMSException
   {
      if (d == null)
      {
         throw new InvalidDestinationException("Cannot create a consumer with a null destination");
      }
      if (!(d instanceof JBossDestination))
      {
         throw new InvalidDestinationException("Not a JBossDestination:" + d);
      }

      log.trace("attempting to create consumer for destination:" + d + (messageSelector == null ? "" : ", messageSelector: " + messageSelector) + (noLocal ? ", noLocal = true" : ""));

      ConsumerDelegate cd = delegate.
View Full Code Here

      {
         throw new IllegalStateException("Cannot create a durable subscriber on a QueueSession");
      }
      if (topic == null)
      {
         throw new InvalidDestinationException("Cannot create a durable subscriber on a null topic");
      }
      if (!(topic instanceof JBossTopic))
      {
         throw new InvalidDestinationException("Not a JBossTopic:" + topic);
      }

      ConsumerDelegate cd =
         delegate.createConsumerDelegate((JBossTopic)topic, null, false, name, false, true);
View Full Code Here

      {
         throw new IllegalStateException("Cannot create a durable subscriber on a QueueSession");
      }
      if (topic == null)
      {
         throw new InvalidDestinationException("Cannot create a durable subscriber on a null topic");
      }
      if (!(topic instanceof JBossTopic))
      {
         throw new InvalidDestinationException("Not a JBossTopic:" + topic);
      }
      messageSelector = checkAndTrim(messageSelector);

      ConsumerDelegate cd = delegate.
         createConsumerDelegate((JBossTopic)topic, messageSelector, noLocal, name, false, true);
View Full Code Here

      {
         throw new IllegalStateException("Cannot create a browser on a TopicSession");
      }
      if (queue == null)
      {
         throw new InvalidDestinationException("Cannot create a browser with a null queue");
      }
      if (!(queue instanceof JBossQueue))
      {
         throw new InvalidDestinationException("Not a JBossQueue:" + queue);
      }
      messageSelector = checkAndTrim(messageSelector);

      BrowserDelegate del =
         delegate.createBrowserDelegate((JBossQueue)queue, messageSelector);
View Full Code Here

                    int priority,
                    long timeToLive) throws JMSException
   {
      if (destination != null && !(destination instanceof JBossDestination))
      {
         throw new InvalidDestinationException("Not a JBossDestination:" + destination);
      }

      delegate.send((JBossDestination)destination, m, deliveryMode, priority, timeToLive);
   }
View Full Code Here

   {
      if (destination instanceof JBossTemporaryTopic)
      {
         if (((JBossTemporaryTopic)destination).isDeleted())
         {
            throw new InvalidDestinationException("Temporary topic was deleted");
         }
      }
      else
      if (destination instanceof JBossTemporaryQueue)
      {
         if (((JBossTemporaryQueue)destination).isDeleted())
         {
            throw new InvalidDestinationException("Temporary queue was deleted");
         }
      }
   }
View Full Code Here

               DestinationManager dm = serverPeer.getDestinationManager();

               ManagedDestination mDest = dm.getDestination(dest.getName(), dest.isQueue());
               if (dm == null)
               {
                  throw new InvalidDestinationException("No such destination: " + dest);
               }

               dm.unregisterDestination(mDest);
            }
View Full Code Here

   {
      if (destination instanceof JBossTemporaryTopic)
      {
         if (((JBossTemporaryTopic)destination).isDeleted())
         {
            throw new InvalidDestinationException("Temporary topic was deleted");
         }
      }
      else
      if (destination instanceof JBossTemporaryQueue)
      {
         if (((JBossTemporaryQueue)destination).isDeleted())
         {
            throw new InvalidDestinationException("Temporary queue was deleted");
         }
      }
   }
View Full Code Here

TOP

Related Classes of javax.jms.InvalidDestinationException

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.