[hornetq-commits] JBoss hornetq SVN: r9458 - trunk/src/main/org/hornetq/core/paging/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Jul 22 17:07:01 EDT 2010


Author: clebert.suconic at jboss.com
Date: 2010-07-22 17:07:01 -0400 (Thu, 22 Jul 2010)
New Revision: 9458

Modified:
   trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java
Log:
A little tweak to release internal memory as soon as we're done with reading the messages

Modified: trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java	2010-07-22 13:18:50 UTC (rev 9457)
+++ trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java	2010-07-22 21:07:01 UTC (rev 9458)
@@ -616,7 +616,22 @@
 
       page.open();
 
-      List<PagedMessage> messages = page.read();
+      List<PagedMessage> messages =  null;
+      
+      try
+      {
+         messages = page.read();
+      }
+      finally
+      {
+         try
+         {
+            page.close();
+         }
+         catch (Throwable ignored)
+         {
+         }
+      }
 
       if (onDepage(page.getPageId(), storeName, messages))
       {



More information about the hornetq-commits mailing list