[jboss-cvs] jboss-jms/src/main/org/jboss/messaging/core ...

Timothy Fox tim.fox at jboss.com
Wed Jul 19 12:21:18 EDT 2006


  User: timfox  
  Date: 06/07/19 12:21:18

  Modified:    src/main/org/jboss/messaging/core    ChannelSupport.java
                        DeliveryObserver.java SimpleDelivery.java
  Log:
  http://jira.jboss.com/jira/browse/JBMESSAGING-433
  
  Revision  Changes    Path
  1.67      +39 -59    jboss-jms/src/main/org/jboss/messaging/core/ChannelSupport.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ChannelSupport.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-jms/src/main/org/jboss/messaging/core/ChannelSupport.java,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -b -r1.66 -r1.67
  --- ChannelSupport.java	17 Jul 2006 17:14:47 -0000	1.66
  +++ ChannelSupport.java	19 Jul 2006 16:21:18 -0000	1.67
  @@ -55,7 +55,7 @@
    * 
    * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
    * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
  - * @version <tt>$Revision: 1.66 $</tt> $Id: ChannelSupport.java,v 1.65
  + * @version <tt>$Revision: 1.67 $</tt> $Id: ChannelSupport.java,v 1.65
    *          2006/06/27 19:44:39 timfox Exp $
    */
   public abstract class ChannelSupport implements Channel
  @@ -226,7 +226,7 @@
   
      // DeliveryObserver implementation --------------------------
   
  -   public void acknowledge(Delivery d, Transaction tx)
  +   public void acknowledge(Delivery d, Transaction tx) throws Throwable
      {
         if (trace)
         {
  @@ -236,8 +236,6 @@
                              : " transactionally in " + tx));
         }
   
  -      try
  -      {
            if (tx == null)
            {
               // acknowledge non transactionally
  @@ -260,7 +258,6 @@
   
               // TODO We should consider also executing acks on the event queue
               acknowledgeInternal(d);
  -
            }
            else
            {
  @@ -278,13 +275,8 @@
               }
            }
         }
  -      catch (Throwable t)
  -      {
  -         log.error("Failed to remove delivery " + d + " from state", t);
  -      }
  -   }
   
  -   public void cancel(Delivery d)
  +   public void cancel(Delivery d) throws Throwable
      {
         // We put the cancellation on the event queue
         // try
  @@ -302,16 +294,8 @@
         // }
   
         // TODO We should also consider executing cancels on the event queue
  -      try
  -      {
            cancelInternal(d);
         }
  -      catch (Throwable t)
  -      {
  -         log.error("Failed to cancel delivery", t);
  -      }
  -
  -   }
   
      // Distributor implementation ------------------------------------
   
  @@ -943,12 +927,6 @@
   
         if (recoverable && d.getReference().isReliable())
         {
  -         // TODO - Optimisation - If the message is acknowledged before the call
  -         // to handle() returns
  -         // And it is a new message then there won't be any reference in the
  -         // database
  -         // So the call to remove from the db is wasted.
  -         // We should add a flag to check this
            pm.removeReference(channelID, d.getReference(), null);
         }
   
  @@ -1272,7 +1250,7 @@
         }
      }
   
  -   protected void acknowledgeInMemory(Delivery d) throws Throwable
  +   protected boolean acknowledgeInMemory(Delivery d) throws Throwable
      {
         if (d == null)
         {
  @@ -1288,6 +1266,8 @@
         {
            log.trace(this + " removed " + d + " from memory:" + removed);
         }
  +      
  +      return removed;
      }
   
      protected void load(int number) throws Exception
  
  
  
  1.8       +3 -3      jboss-jms/src/main/org/jboss/messaging/core/DeliveryObserver.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: DeliveryObserver.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-jms/src/main/org/jboss/messaging/core/DeliveryObserver.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- DeliveryObserver.java	17 Jan 2006 12:15:31 -0000	1.7
  +++ DeliveryObserver.java	19 Jul 2006 16:21:18 -0000	1.8
  @@ -26,12 +26,12 @@
   /**
    * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
    * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
  - * @version <tt>$Revision: 1.7 $</tt>
  - * $Id: DeliveryObserver.java,v 1.7 2006/01/17 12:15:31 timfox Exp $
  + * @version <tt>$Revision: 1.8 $</tt>
  + * $Id: DeliveryObserver.java,v 1.8 2006/07/19 16:21:18 timfox Exp $
    */
   public interface DeliveryObserver
   {
  -   void acknowledge(Delivery d, Transaction tx);
  +   void acknowledge(Delivery d, Transaction tx) throws Throwable;
   
      void cancel(Delivery d) throws Throwable;
   }
  
  
  
  1.20      +5 -5      jboss-jms/src/main/org/jboss/messaging/core/SimpleDelivery.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SimpleDelivery.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-jms/src/main/org/jboss/messaging/core/SimpleDelivery.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -b -r1.19 -r1.20
  --- SimpleDelivery.java	22 Jun 2006 10:14:34 -0000	1.19
  +++ SimpleDelivery.java	19 Jul 2006 16:21:18 -0000	1.20
  @@ -31,9 +31,9 @@
    *
    * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
    * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
  - * @version <tt>$Revision: 1.19 $</tt>
  + * @version <tt>$Revision: 1.20 $</tt>
    * 
  - * $Id: SimpleDelivery.java,v 1.19 2006/06/22 10:14:34 timfox Exp $
  + * $Id: SimpleDelivery.java,v 1.20 2006/07/19 16:21:18 timfox Exp $
    */
   public class SimpleDelivery implements SingleReceiverDelivery, Serializable
   {
  
  
  



More information about the jboss-cvs-commits mailing list