Package javax.jms

Examples of javax.jms.InvalidDestinationException


      {
         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);
      }
      if ("".equals(messageSelector))
      {
         messageSelector = null;
      }
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);
      }
      if ("".equals(messageSelector))
      {
         messageSelector = null;
      }
View Full Code Here

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

      ThreadContextClassLoaderChanger tccc = new ThreadContextClassLoaderChanger();

      try
View Full Code Here

         destination.setJndiName(jndiName);
        
         try
         {
            initialContext.lookup(jndiName);
            throw new InvalidDestinationException("Destination " + destination.getName() + " already exists");
         }
         catch(NameNotFoundException e)
         {
            // OK
         }     
View Full Code Here

   public void setJMSReplyTo(Destination replyTo) throws JMSException
   {
      if (!(replyTo instanceof JBossDestination))
      {
         throw new InvalidDestinationException("Replyto cannot be foreign");
      }
      headers.put(REPLYTO_HEADER_NAME, (JBossDestination)replyTo);
   }
View Full Code Here

   public void setJMSDestination(Destination destination) throws JMSException
   {
      if (!(destination instanceof JBossDestination))
      {
         throw new InvalidDestinationException("Destination cannot be foreign");
      }
     
      //We don't store as a header when setting - this allows us to avoid a lookup on the server
      //when routing the message
      this.destination = (JBossDestination)destination;
View Full Code Here

  
   QueueSession getQueueSession() throws JMSException
   {
      Session s = getSession();
      if( !(s instanceof QueueSession) )
         throw new InvalidDestinationException("Attempting to use QueueSession methods on: "+this);
      return (QueueSession) s;
   }
View Full Code Here

  
   TopicSession getTopicSession() throws JMSException
   {
      Session s = getSession();
      if( !(s instanceof TopicSession) )
         throw new InvalidDestinationException("Attempting to use TopicSession methods on: "+this);
      return (TopicSession) s;
   }
View Full Code Here

    private void checkValidDestination(Destination destination) throws InvalidDestinationException
    {
        if (destination == null || !(destination instanceof DestinationImpl))
        {
            throw new InvalidDestinationException("Invalid Destination");
        }
    }
View Full Code Here

    {
        checkClosed();
        checkNotQueueSession();
        if(!(topic instanceof TopicImpl))
        {
            throw new InvalidDestinationException("invalid destination " + topic);
        }
        final TopicSubscriberImpl messageConsumer;
        synchronized(_session.getEndpoint().getLock())
        {
            messageConsumer = new TopicSubscriberImpl(name, true, (org.apache.qpid.amqp_1_0.jms.Topic) topic, this,
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.