Examples of MessagingQueue


Examples of de.willuhn.jameica.messaging.MessagingQueue

      return;
   
    // wir registrieren hier noch einen Message-Consumer, damit wir benachrichtigt werden,
    // wenn das Datum geaendert wurde.
    final MessageConsumer mc = new DateChangedConsumer();
    final MessagingQueue queue = Application.getMessagingFactory().getMessagingQueue(TerminInput.QUEUE_TERMIN_CHANGED);
    queue.registerMessageConsumer(mc);
    parent.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent e)
      {
        queue.unRegisterMessageConsumer(mc);
      }
    });
  }
View Full Code Here

Examples of org.jboss.messaging.core.impl.MessagingQueue

         if (mapping.getFilterString() != null)
         {
           filter = filterFactory.createFilter(mapping.getFilterString());
         }
        
         Queue queue = new MessagingQueue(mapping.getNodeId(), mapping.getQueueName(), mapping.getChannelId(),
                                          mapping.isRecoverable(), filter, true);
        
         Condition condition = conditionFactory.createCondition(mapping.getConditionText());
        
         addBindingInMemory(new Binding(condition, queue, false));
        
         if (mapping.isAllNodes())
         {
           // insert into db if not already there
           if (!loadedBindings.containsKey(queue.getName()))
           {
             //Create a local binding too
            
            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());    
           
            Binding localBinding = new Binding(condition, queue2, true);
View Full Code Here

Examples of org.jboss.messaging.core.impl.MessagingQueue

      if (mapping.getFilterString() != null)
      {
        filter = filterFactory.createFilter(mapping.getFilterString());
      }
     
      Queue queue = new MessagingQueue(mapping.getNodeId(), mapping.getQueueName(), mapping.getChannelId(),
                                       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)
               {
                  log.trace(this + " inserted in binding locally");
               }
               queue2.load();

               queue2.activate();
            }
         }
     }
     
      synchronized (waitForBindUnbindLock)
View Full Code Here

Examples of org.jboss.messaging.core.impl.MessagingQueue

                  if (selector != null)
                  {
                     filter = filterFactory.createFilter(selector);
                  }

                  Queue queue = new MessagingQueue(thisNodeID, queueName, channelID, ms, pm,
                                                   true, filter, bindingClustered && clustered);

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

Examples of org.jboss.messaging.core.impl.MessagingQueue

                  if (selector != null)
                  {
                     filter = filterFactory.createFilter(selector);
                  }

                  Queue queue = new MessagingQueue(thisNodeID, queueName, channelID, ms, pm,
                                                   true, filter, bindingClustered && clustered);

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

Examples of org.jboss.messaging.core.impl.MessagingQueue

         if (mapping.getFilterString() != null)
         {
           filter = filterFactory.createFilter(mapping.getFilterString());
         }
        
         Queue queue = new MessagingQueue(mapping.getNodeId(), mapping.getQueueName(), mapping.getChannelId(),
                                          mapping.isRecoverable(), filter, true);
        
         Condition condition = conditionFactory.createCondition(mapping.getConditionText());
        
         addBindingInMemory(new Binding(condition, queue, false));
        
         if (mapping.isAllNodes())
         {
           // insert into db if not already there
           if (!loadedBindings.containsKey(queue.getName()))
           {
             //Create a local binding too
            
            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());    
           
            Binding localBinding = new Binding(condition, queue2, true);
View Full Code Here

Examples of org.jboss.messaging.core.impl.MessagingQueue

      if (mapping.getFilterString() != null)
      {
        filter = filterFactory.createFilter(mapping.getFilterString());
      }
     
      Queue queue = new MessagingQueue(mapping.getNodeId(), mapping.getQueueName(), mapping.getChannelId(),
                                       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
       boolean added = internalAddBinding(new Binding(condition, queue2, true), false, false);
      
       if (added)
       {        
         if (trace) { log.trace(this + " inserted in binding locally"); }     
        
         queue2.load();
          
          queue2.activate();        
       }
     }
     
      synchronized (waitForBindUnbindLock)
      {
View Full Code Here

Examples of org.jboss.messaging.core.impl.MessagingQueue

                  if (selector != null)
                  {
                     filter = filterFactory.createFilter(selector);
                  }

                  Queue queue = new MessagingQueue(thisNodeID, queueName, channelID, ms, pm,
                                                   true, filter, bindingClustered && clustered);

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

                  Condition condition = conditionFactory.createCondition(conditionText);
View Full Code Here

Examples of org.jboss.messaging.core.impl.MessagingQueue

                  if (selector != null)
                  {
                     filter = filterFactory.createFilter(selector);
                  }

                  Queue queue = new MessagingQueue(thisNodeID, queueName, channelID, ms, pm,
                                                   true, filter, bindingClustered && clustered);

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

                  Condition condition = conditionFactory.createCondition(conditionText);
View Full Code Here

Examples of org.jboss.messaging.core.impl.MessagingQueue

         dm.registerDestination(mDest);

         if (dest.isQueue())
         {
            Queue coreQueue = new MessagingQueue(nodeId, dest.getName(),
                                     idm.getID(), ms, pm, false, -1, null,
                                       fullSize, pageSize, downCacheSize, postOffice.isClustered(),
                                       sp.getRecoverDeliveriesTimeout());


            Condition cond = new JMSCondition(true, dest.getName());

           // make a binding for this temporary queue

            // temporary queues need to bound on ALL nodes of the cluster
            postOffice.addBinding(new Binding(cond, coreQueue, true), postOffice.isClustered());

            coreQueue.activate();
         }
      }
      catch (Throwable t)
      {
         throw ExceptionUtil.handleJMSInvocation(t, this + " addTemporaryDestination");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.