[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: bug in session.rollback()

timfox do-not-reply at jboss.com
Fri Mar 27 07:48:33 EDT 2009


Probably the real bug is that it's not using the queue from the reference, it's using the owner queue of the inner class, i.e. something like:


  | void postRollback(LinkedList<MessageReference> refs) throws Exception
  |    {
  |       synchronized (this)
  |       {
  |          for (MessageReference ref : refs)
  |          {
  |             ServerMessage msg = ref.getMessage();
  | 
  |             if (!scheduledDeliveryHandler.checkAndSchedule(ref, backup))
  |             {              
  |                messageReferences.addFirst(ref, msg.getPriority());
  |             }
  |          }
  | 
  |          deliver();
  |       }
  |    }
  | 

Should really be:


  | void postRollback(LinkedList<MessageReference> refs) throws Exception
  |    {
  |       synchronized (this)
  |       {
  |          for (MessageReference ref : refs)
  |          {
  |             ServerMessage msg = ref.getMessage();
  | 
  |             if (!scheduledDeliveryHandler.checkAndSchedule(ref, backup))
  |             {              
  |                ref.getQueue().messageReferences.addFirst(ref, msg.getPriority());
  |             }
  |          }
  | 
  |          deliver();
  |       }
  |    }
  | 

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

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



More information about the jboss-dev-forums mailing list