[jboss-cvs] JBoss Messaging SVN: r3007 - trunk/src/main/org/jboss/messaging/core/impl/postoffice.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Aug 13 12:01:42 EDT 2007


Author: timfox
Date: 2007-08-13 12:01:41 -0400 (Mon, 13 Aug 2007)
New Revision: 3007

Modified:
   trunk/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
Log:
http://jira.jboss.com/jira/browse/JBMESSAGING-1029


Modified: trunk/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java	2007-08-13 15:31:41 UTC (rev 3006)
+++ trunk/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java	2007-08-13 16:01:41 UTC (rev 3007)
@@ -2195,6 +2195,8 @@
    {
    	lock.writeLock().acquire();
    	
+   	Binding binding = null;
+   	
    	try
    	{
    		Integer nid = new Integer(nodeID);
@@ -2206,7 +2208,7 @@
 	   		return null;
 	   	}
 	   	
-	   	Binding binding = (Binding)nameMap.remove(queueName);
+	   	binding = (Binding)nameMap.remove(queueName);
 	   	
 	   	if (binding == null)
 	   	{
@@ -2249,17 +2251,18 @@
 	      	mappings.remove(binding.condition);
 	      }
 	      
-	      // Send a notification
-	      ClusterNotification notification = new ClusterNotification(ClusterNotification.TYPE_UNBIND, nodeID, queueName);
-	      
-	      clusterNotifier.sendNotification(notification);
-	      
-	      return binding;
    	}
    	finally
    	{
    		lock.writeLock().release();
    	}
+   	
+      // Send a notification
+      ClusterNotification notification = new ClusterNotification(ClusterNotification.TYPE_UNBIND, nodeID, queueName);
+      
+      clusterNotifier.sendNotification(notification);
+      
+      return binding;
    }
    
    private boolean addBindingInMemory(Binding binding) throws Exception




More information about the jboss-cvs-commits mailing list