Package org.jboss.jms.server

Examples of org.jboss.jms.server.JMSCondition


      return subs;
   }
  
   private int getMessageCount(int type) throws Exception
   {
      JMSCondition topicCond = new JMSCondition(false, name);
     
      Collection subs = serverPeer.getPostOfficeInstance().getBindingsForCondition(topicCond);
     
      Iterator iter = subs.iterator();
     
View Full Code Here


      return count;
  
  
   private int getSubscriptionsCount(boolean durable) throws Exception
   {
      JMSCondition topicCond = new JMSCondition(false, name);
     
      Collection subs = serverPeer.getPostOfficeInstance().getBindingsForCondition(topicCond);
     
      Iterator iter = subs.iterator();
     
View Full Code Here

   }
  
  
   private String listSubscriptionsAsHTML(int type) throws Exception
   {
      JMSCondition topicCond = new JMSCondition(false, name);
     
      Collection bindings = serverPeer.getPostOfficeInstance().getBindingsForCondition(topicCond);
          
      StringBuffer sb = new StringBuffer();
     
View Full Code Here

                    
         if (queue == null)
         {          
            // Create a new queue
           
            JMSCondition queueCond = new JMSCondition(true, destination.getName());
           
            if (postOffice.isLocal() || !destination.isClustered())
            {
               queue = new PagingFilteredQueue(destination.getName(),
                                               idm.getID(), ms, pm, true, true,
View Full Code Here

      return maxSize;
   }
  
   public void setMaxSize(int maxSize) throws Exception
   {
      Condition cond = new JMSCondition(isQueue(), name);
     
      PostOffice postOffice = serverPeer.getPostOfficeInstance();
     
      Collection subs = postOffice.getBindingsForCondition(cond);
     
View Full Code Here

         if (postOffice == null)
          throw new IllegalArgumentException("Post Office instance not found. Check your destination configuration.");
         destination.setServerPeer(serverPeer);
        
         JMSCondition topicCond = new JMSCondition(false, destination.getName());
                   
         // We deploy any queues corresponding to pre-existing durable subscriptions
         Collection bindings = postOffice.getBindingsForCondition(topicCond);
         Iterator iter = bindings.iterator();
         while (iter.hasNext())
View Full Code Here

         //from memory
        
         //First we remove any data for a non durable sub - a non durable sub might have data in the
         //database since it might have paged
        
         JMSCondition topicCond = new JMSCondition(false, destination.getName());        
        
         Collection bindings = postOffice.getBindingsForCondition(topicCond);
        
         Iterator iter = bindings.iterator();
         while (iter.hasNext())           
View Full Code Here

      b.queue.setClustered(newDest.isClustered());
  
      if (newDest.isQueue())
      {
         JMSCondition queueCond = new JMSCondition(true, queueName);
         addBinding(new Binding(queueCond, b.queue, false), false);
      }
      else
      {
         b.queue.setClustered(newDest.isClustered());
         JMSCondition queueCond = new JMSCondition(false, newDest.getName());
         addBinding(new Binding(queueCond, b.queue, true), newDest.isClustered());
      }
     
      return b.queue;
   }
View Full Code Here

                  //which always happens before the connection closed (depth first close)
                 //note there are no durable subs on a temporary topic

                 //Sanity check

                  Collection queues = serverPeer.getPostOfficeInstance().getQueuesForCondition(new JMSCondition(false, dest.getName()), true);

                  if (!queues.isEmpty())
                  {
                     // This should never happen
                     throw new IllegalStateException("Cannot delete temporary destination if it has consumer(s)");
View Full Code Here

        }
      }
      else if (dest.isQueue())
      {
         if (trace) { log.trace(this + " routing " + msg + " to queue"); }
         if (!postOffice.route(ref, new JMSCondition(true, dest.getName()), tx))
         {
            throw new JMSException("Failed to route " + ref + " to " + dest.getName());
         }
      }
      else
      {
         if (trace) { log.trace(this + " routing " + msg + " to postoffice"); }
         postOffice.route(ref, new JMSCondition(false, dest.getName()), tx);
      }

      if (trace) { log.trace("sent " + msg); }

      return true;
View Full Code Here

TOP

Related Classes of org.jboss.jms.server.JMSCondition

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.