[jboss-user] [JBoss Messaging] - Re: Messaging hangs

timfox do-not-reply at jboss.com
Wed Aug 1 08:25:31 EDT 2007


Martin-

I think I can see a deadlock in the stack you provided, can you try something out for me?

In the method org.jboss.messaging.core.impl.postoffice.MessagingPostOffice::removeBindingInMemory there is the following code:


  | 	      if (queues.isEmpty())
  | 	      {
  | 	      	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();
  |    	}
  |    }
  | 

Can you move the notification send outside the lock so it reads something like:


  | 	      if (queues.isEmpty())
  | 	      {
  | 	      	mappings.remove(binding.condition);
  | 	      }		      
  |    	}
  |    	finally
  |    	{
  |    		lock.writeLock().release();
  |    	}
  |       
  | 	  // Send a notification
  | 	 ClusterNotification notification = new ClusterNotification(ClusterNotification.TYPE_UNBIND, nodeID, queueName);
  | 	      
  | 	  clusterNotifier.sendNotification(notification);
  | 
  |        return binding;
  |    }
  | 

and rebuild?

Sorry, but we are a bit snowed under here (understatement of the century) so any help greatly appreciated.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069600#4069600

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069600



More information about the jboss-user mailing list