qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnaudsi...@apache.org
Subject svn commit: r574226 - /incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/jms/SessionImpl.java
Date Mon, 10 Sep 2007 12:40:54 GMT
Author: arnaudsimon
Date: Mon Sep 10 05:40:53 2007
New Revision: 574226

URL: http://svn.apache.org/viewvc?rev=574226&view=rev
Log:
updated recover

Modified:
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/jms/SessionImpl.java

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/jms/SessionImpl.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/jms/SessionImpl.java?rev=574226&r1=574225&r2=574226&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/jms/SessionImpl.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/jms/SessionImpl.java
Mon Sep 10 05:40:53 2007
@@ -122,7 +122,7 @@
      * This session connection
      */
     private ConnectionImpl _connection;
-    
+
     /**
      * This will be used as the message actor id
      * This in turn will be set as the destination
@@ -465,13 +465,13 @@
             throw new IllegalStateException("Session is transacted");
         }
         // release all unack messages
+        RangeSet ranges = new RangeSet();
         for (QpidMessage message : _unacknowledgedMessages)
         {
-            // release this message
-            RangeSet ranges = new RangeSet();
+            // release this message           
             ranges.add(message.getMessageTransferId());
-            getQpidSession().messageRelease(ranges);
         }
+        getQpidSession().messageRelease(ranges);
     }
 
     /**
@@ -599,7 +599,8 @@
         MessageConsumerImpl consumer;
         try
         {
-            consumer = new MessageConsumerImpl(this, (DestinationImpl) destination, messageSelector,
noLocal, null,String.valueOf(_consumerTag.incrementAndGet()));
+            consumer = new MessageConsumerImpl(this, (DestinationImpl) destination, messageSelector,
noLocal, null,
+                                               String.valueOf(_consumerTag.incrementAndGet()));
         }
         catch (Exception e)
         {
@@ -726,7 +727,8 @@
         try
         {
             subscriber = new TopicSubscriberImpl(this, topic, messageSelector, noLocal,
-                                                 _connection.getClientID() + ":" + name,String.valueOf(_consumerTag.incrementAndGet()));
+                                                 _connection.getClientID() + ":" + name,
+                                                 String.valueOf(_consumerTag.incrementAndGet()));
         }
         catch (Exception e)
         {
@@ -770,7 +772,8 @@
         QueueBrowserImpl browser;
         try
         {
-            browser = new QueueBrowserImpl(this, queue, messageSelector,String.valueOf(_consumerTag.incrementAndGet()));
+            browser =
+                    new QueueBrowserImpl(this, queue, messageSelector, String.valueOf(_consumerTag.incrementAndGet()));
         }
         catch (Exception e)
         {
@@ -1301,7 +1304,7 @@
                     {
                         try
                         {
-                           // mc.onMessage(message.getMessage());
+                            // mc.onMessage(message.getMessage());
                             mc.notifyMessageListener(message.getMessage());
                         }
                         catch (RuntimeException t)



Mime
View raw message