[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBMESSAGING-1460 - ScheduledDeliveryTest on JBM 1.4

clebert.suconic@jboss.com do-not-reply at jboss.com
Thu Dec 18 17:59:56 EST 2008


deliveringCount.decrement is being called twice.


I did some debugging and deliveringCount become negative at acknowledgeInternal. (I added some System.out to debug it)


  protected void acknowledgeInternal(Delivery d, Transaction tx, boolean persist) throws Exception
  |    {
  | 
  | ....
  |          if (!d.isRecovered())
  |          {
  |          	if (deliveringCount.decrement() < 0)
  |          	{
  |                          System.out.println("Oops... deliveringCount became negative at acknowledgeInternal"); // I added this print here
  |          	}
  |          }
  | 
  | ......
  |   }
  | 


Why the test is asserting for -1? it seems to me the valid condition would be 0, and deliveringCount being decremented to -1 would be a bug?

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

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



More information about the jboss-dev-forums mailing list