Package org.jboss.messaging.core.contract

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


                                       mapping.isRecoverable(), filter, mapping.isClustered());
     
      Condition condition = conditionFactory.createCondition(mapping.getConditionText());
     
      //addBindingInMemory(new Binding(condition, queue, mapping.isAllNodes()));
      addBindingInMemory(new Binding(condition, queue, false));
     
      if (allNodes)
     {
       if (trace) { log.trace("allNodes is true, so also forcing a local bind"); }
      
       //There is the possibility that two nodes send a bind all with the same name simultaneously OR
       //a node starts and sends a bind "ALL" and the other nodes already have a queue with that name
       //This is ok - but we must check for this and not create the local binding in this case
                            
       //Bind locally

       long channelID = channelIDManager.getID();
      
       Queue queue2 = new MessagingQueue(thisNodeID, mapping.getQueueName(), channelID, ms, pm,
                                        mapping.isRecoverable(), mapping.getMaxSize(), filter,
                                        mapping.getFullSize(), mapping.getPageSize(), mapping.getDownCacheSize(), true,
                                        mapping.getRecoverDeliveriesTimeout());

       //We must cast back asynchronously to avoid deadlock
       //we need put adding binding and queue's loading and activations into one sync block
       //https://jira.jboss.org/jira/browse/JBMESSAGING-1760
         synchronized (queue2)
         {
            boolean added = internalAddBinding(new Binding(condition, queue2, true), false, false);

            if (added)
            {
               if (trace)
               {
View Full Code Here


   public void handleReplicateDelivery(int nodeID, String queueName, String sessionID, long messageID,
                                     long deliveryID, final Address replyAddress) throws Exception
   {
     if (trace) { log.trace(this + " handleReplicateDelivery for queue " + queueName + " session " + sessionID + " message " + messageID); }
    
     Binding binding = getBindingForQueueName(queueName);
    
     if (binding == null)
     {
       //This is ok - the queue might not have been deployed yet - when the queue is deployed it
       //will request for deliveries to be sent to it in a batch
View Full Code Here

   public void handleGetReplicatedDeliveries(String queueName, Address returnAddress) throws Exception
   {
     if (trace) { log.trace(this + " handleGetReplicateDelivery for queue " + queueName); }

     Binding binding = getBindingForQueueName(queueName);

     if (binding == null)
     {
       //This is ok -the queue might have been undeployed since we thought it was deployed and sent the request
      
View Full Code Here

     }
   }         
  
   public void handleReplicateAck(int nodeID, String queueName, long messageID) throws Exception
   {
      Binding binding = getBindingForQueueName(queueName);
    
     if (binding == null)
     {
       //This is ok - maybe new failover node but queue is not yet deployed
       return;
View Full Code Here

       {
         Iterator iter = localNameMap.values().iterator();
        
         while (iter.hasNext())
         {
           Binding binding = (Binding)iter.next();
          
           binding.queue.removeAllFromRecoveryArea(nodeID);
         }
       }
     }
View Full Code Here

           String queueName = (String)entry.getKey();
          
           Map ids = (Map)entry.getValue();
          
   
           Binding binding = (Binding)localNameMap.get(queueName);
          
           if (binding == null)
           {
             throw new IllegalStateException("Cannot find binding with name " + queueName + " maybe it hasn't been deployed");
           }
View Full Code Here

      {
        Map nameMap = (Map)nameMaps.get(masterNodeID);
       
        if (nameMap != null)
        {
          Binding b = (Binding)nameMap.get(queue.getName());
         
          if (b != null)
          {
            //Already deployed on master node - tell the master to send us the deliveries
            //This copes with the case when queues were deployed on the failover before being deployed on the master
View Full Code Here

      if (queueName == null)
      {
         throw new IllegalArgumentException("Queue name is null");
      }

      Binding removed = removeBindingInMemory(thisNodeID, queueName);

      //The queue might not be removed (it's already removed) if two unbind all requests are sent simultaneously on the cluster
      if (removed != null)
      {
        Queue queue = removed.queue;
View Full Code Here

       {
         Map nameMap = (Map)iter.next();
        
         if (queueName != null)
         {
           Binding binding = (Binding)nameMap.get(queueName);
          
           if (binding != null)
           {
             bindings.add(binding);
           }
View Full Code Here

         {
            intr = true;
         }
      }
    
     Binding binding = null;
    
     try
     {
       Integer nid = new Integer(nodeID);
      
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.