Package org.jboss.messaging.core.contract

Examples of org.jboss.messaging.core.contract.Binding


                  if (trace) { log.trace(this + " loaded binding from storage: " + queueName); }
                 
                  Condition condition = conditionFactory.createCondition(conditionText);

                  Binding binding = new Binding(condition, queue, allNodes);

                  bindings.put(queueName, binding);
               }

               return bindings;
View Full Code Here


     
      log.trace("Loading bindings");
     
      while (iter.hasNext())
      {
        Binding binding = (Binding)iter.next();

        addBindingInMemory(binding);   
       
        Queue queue = binding.queue;
        
View Full Code Here

          {
            Queue queue = (Queue)iter2.next();
           
            if (queue.getNodeID() == nodeToRemove.intValue())
            {
              toRemove.add(new Binding(condition, queue, false));
            }
          }
        }
       
        iter = toRemove.iterator();
       
        while (iter.hasNext())
        {
          Binding binding = (Binding)iter.next();

          removeBindingInMemory(nodeToRemove.intValue(), binding.queue.getName());
        }
      }
      finally
View Full Code Here

            {
               Iterator iter = nameMap.values().iterator();

               while (iter.hasNext())
               {
                  Binding binding = (Binding)iter.next();

                  Queue queue = binding.queue;

                  if (queue.isRecoverable() && queue.getNodeID() == failedNodeID.intValue())
                  {
                     toRemove.add(binding);
                  }
               }
            }

            Iterator iter = toRemove.iterator();

            while (iter.hasNext())
            {
               Binding binding = (Binding)iter.next();

               Condition condition = binding.condition;

               Queue queue = binding.queue;

               // Sanity check
               if (!queue.isRecoverable())
               {
                  throw new IllegalStateException("Found non recoverable queue " + queue.getName() +
                                                  " in map, these should have been removed!");
               }

               // Sanity check
               if (!queue.isClustered())
               {
                  throw new IllegalStateException("Queue " + queue.getName() + " is not clustered!");
               }

               // Remove from the in-memory map - no need to broadcast anything - they will get removed from other nodes
               // in memory
               // maps when the other nodes detect failure
               removeBindingInMemory(binding.queue.getNodeID(), binding.queue.getName());

               // Find if there is a local queue with the same name

               Queue localQueue = null;

               if (localNameMap != null)
               {
                  Binding b = (Binding)localNameMap.get(queue.getName());
                  if (b != null)
                  {
                     localQueue = b.queue;
                  }
               }
View Full Code Here

                  if (trace) { log.trace(this + " loaded binding from storage: " + queueName); }
                 
                  Condition condition = conditionFactory.createCondition(conditionText);

                  Binding binding = new Binding(condition, queue, allNodes);

                  bindings.put(queueName, binding);
               }

               return bindings;
View Full Code Here

        
         Iterator mIter1 = msgList1.iterator();
         while (mIter1.hasNext())
         {
            MessageChannelPair pair = (MessageChannelPair)mIter1.next();
            Binding binding = postOffice.getBindingForChannelID(pair.getChannelId());
            String qname = binding.queue.getName();
            Long chid = binding.queue.getChannelID();
            String qkey = qname + " (" + chid + ")";
            List<String> msgs = qInfo.get(qkey);
            if (msgs == null)
            {
               msgs = new ArrayList<String>();
               qInfo.put(qkey, msgs);
            }
            msgs.add(String.valueOf(pair.getMessage().getMessageID()) + " (+)");
         }
        
         Iterator mIter2 = msgList2.iterator();
         while (mIter2.hasNext())
         {
            MessageChannelPair pair = (MessageChannelPair)mIter2.next();
            Binding binding = postOffice.getBindingForChannelID(pair.getChannelId());
            String qname = binding.queue.getName();
            Long chid = binding.queue.getChannelID();
            String qkey = qname + " (" + chid + ")";
            List<String> msgs = qInfo.get(qkey);
            if (msgs == null)
View Full Code Here

        
         Iterator mIter1 = msgList1.iterator();
         while (mIter1.hasNext())
         {
            MessageChannelPair pair = (MessageChannelPair)mIter1.next();
            Binding binding = postOffice.getBindingForChannelID(pair.getChannelId());
            String qname = binding.queue.getName();
            Long chid = binding.queue.getChannelID();
            String qkey = qname + " (" + chid + ")";
            List<String> msgs = qInfo.get(qkey);
            if (msgs == null)
            {
               msgs = new ArrayList<String>();
               qInfo.put(qkey, msgs);
            }
            msgs.add(String.valueOf(pair.getMessage().getMessageID()) + " (+)");
         }
        
         Iterator mIter2 = msgList2.iterator();
         while (mIter2.hasNext())
         {
            MessageChannelPair pair = (MessageChannelPair)mIter2.next();
            Binding binding = postOffice.getBindingForChannelID(pair.getChannelId());
            String qname = binding.queue.getName();
            Long chid = binding.queue.getChannelID();
            String qkey = qname + " (" + chid + ")";
            List<String> msgs = qInfo.get(qkey);
            if (msgs == null)
View Full Code Here

         // This can be null... JMXAccessor will return null if InstanceNotFoundException is caught
         dest = (ManagedQueue) JMXAccessor.getJMXAttributeOverSecurity(getServer(), defaultDLQObjectName, "Instance");

         if (dest != null && dest.getName() != null)
         {
            Binding binding = postOffice.getBindingForQueueName(dest.getName());

            if (binding == null)
            {
              throw new IllegalStateException("Cannot find binding for queue " + dest.getName());
            }
View Full Code Here

            //Ok
         }

         if (dest != null && dest.getName() != null)
         {
           Binding binding = postOffice.getBindingForQueueName(dest.getName());

            if (binding == null)
            {
              throw new IllegalStateException("Cannot find binding for queue " + dest.getName());
            }
View Full Code Here

                  if (trace) { log.trace(this + " loaded binding from storage: " + queueName); }

                  Condition condition = conditionFactory.createCondition(conditionText);

                  Binding binding = new Binding(condition, queue, allNodes);

                  bindings.put(queueName, binding);
               }

               return bindings;
View Full Code Here

TOP

Related Classes of org.jboss.messaging.core.contract.Binding

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.