[jboss-cvs] JBoss Messaging SVN: r2427 - trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Feb 25 05:27:00 EST 2007


Author: timfox
Date: 2007-02-25 05:26:59 -0500 (Sun, 25 Feb 2007)
New Revision: 2427

Modified:
   trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java
Log:
Fixed temporary queue test



Modified: trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java	2007-02-25 06:34:10 UTC (rev 2426)
+++ trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java	2007-02-25 10:26:59 UTC (rev 2427)
@@ -1146,32 +1146,54 @@
                {
                   routed = true;
 
-                  ClusteredQueue queue = (ClusteredQueue)del.getObserver();
+                  Queue queue = (Queue)del.getObserver();
 
-                  if (trace) { log.trace(this + " successfully routed message to " + (queue.isLocal() ? "LOCAL"  : "REMOTE") + " destination '" + queue.getName() + "' on node " + queue.getNodeId()); }
-
-                  if (router.getNumberOfReceivers() > 1)
+                  if (trace)
                   {
-                     // We have now chosen which one will receive the message so we need to add this
-                     // information to a map which will get sent when casting - so the the queue on
-                     // the receiving node knows whether to receive the message.
-
-                     if (queueNameNodeIdMap == null)
+                     if (queue.isClustered())
                      {
-                        queueNameNodeIdMap = new HashMap();
+                        ClusteredQueue cq = (ClusteredQueue)queue;
+                        log.trace(this + " successfully routed message to " + (cq.isLocal() ? "LOCAL"  : "REMOTE") + " destination '" + cq.getName() + "' on node " + cq.getNodeId());
                      }
-
-                     queueNameNodeIdMap.put(queue.getName(), new Integer(queue.getNodeId()));
+                     else
+                     {
+                        
+                     }
                   }
 
-                  if (!queue.isLocal())
+                  if (queue.isClustered())
                   {
-                     // We need to send the message remotely, count recipients so we know whether
-                     // to unicast or multicast
-                     numberRemote++;
-                     lastNodeId = queue.getNodeId();
-                     lastChannelId = queue.getChannelID();
+                     ClusteredQueue cq = (ClusteredQueue)queue;
+                     
+                     if (trace) { log.trace(this + " successfully routed message to " + (cq.isLocal() ? "LOCAL"  : "REMOTE") + " destination '" + cq.getName() + "' on node " + cq.getNodeId()); }
+                     
+                     if (router.getNumberOfReceivers() > 1)
+                     {
+                        // We have now chosen which one will receive the message so we need to add this
+                        // information to a map which will get sent when casting - so the the queue on
+                        // the receiving node knows whether to receive the message.
+   
+                        if (queueNameNodeIdMap == null)
+                        {
+                           queueNameNodeIdMap = new HashMap();
+                        }
+   
+                        queueNameNodeIdMap.put(queue.getName(), new Integer(cq.getNodeId()));
+                     }
+   
+                     if (!cq.isLocal())
+                     {
+                        // We need to send the message remotely, count recipients so we know whether
+                        // to unicast or multicast
+                        numberRemote++;
+                        lastNodeId = cq.getNodeId();
+                        lastChannelId = queue.getChannelID();
+                     }
                   }
+                  else
+                  {
+                     if (trace) { log.trace(this + " successfully routed message to non clustered destination '" + queue.getName()); }
+                  }
                }
             }
 




More information about the jboss-cvs-commits mailing list