[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: perfSender/perfListener is acting weird

timfox do-not-reply at jboss.com
Wed Oct 1 04:50:56 EDT 2008


I fixed an issue in QueueImpl that might be causing this, but I can't commit yet due to other changes.

If you want to apply the fix yourself locally, add the following synchronized block in DeliverRunner in QueueImpl.java


  | 
  |  private class DeliverRunner implements Runnable
  |    {
  |       public void run()
  |       {
  |          // Must be set to false *before* executing to avoid race
  |          waitingToDeliver.set(false);
  | 
  |          //must synchronize
  |          synchronized (QueueImpl.this)
  |          {
  |             deliver();
  |          }
  |       }
  |    }
  | 
  | 


Without the synchronize block messages can get lost and get delivered out of order

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

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



More information about the jboss-dev-forums mailing list