[hornetq-commits] JBoss hornetq SVN: r11631 - in branches/Branch_2_2_EAP/src/main/org/hornetq/core: server/impl and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Nov 2 10:41:27 EDT 2011


Author: clebert.suconic at jboss.com
Date: 2011-11-02 10:41:27 -0400 (Wed, 02 Nov 2011)
New Revision: 11631

Modified:
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PagingManagerImpl.java
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
Fixing file leak that will affect windows on paging

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PagingManagerImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PagingManagerImpl.java	2011-11-02 04:15:29 UTC (rev 11630)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PagingManagerImpl.java	2011-11-02 14:41:27 UTC (rev 11631)
@@ -114,8 +114,17 @@
 
       for (PagingStore store : reloadedStores)
       {
-         store.start();
-         stores.put(store.getStoreName(), store);
+         PagingStore oldStore = stores.get(store.getStoreName());
+         if (oldStore != null)
+         {
+            oldStore.stop();
+            oldStore.start();
+         }
+         else
+         {
+            store.start();
+            stores.put(store.getStoreName(), store);
+         }
       }
 
    }

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java	2011-11-02 04:15:29 UTC (rev 11630)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java	2011-11-02 14:41:27 UTC (rev 11631)
@@ -426,6 +426,10 @@
             {
 
                currentPageId = 0;
+               if (currentPage != null)
+               {
+                  currentPage.close();
+               }
                currentPage = null;
 
                List<String> files = fileFactory.listFiles("page");

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java	2011-11-02 04:15:29 UTC (rev 11630)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java	2011-11-02 14:41:27 UTC (rev 11631)
@@ -317,6 +317,7 @@
 
    public synchronized void start() throws Exception
    {
+      log.debug("Starting server " + this);
       OperationContextImpl.clearContext();
 
       try



More information about the hornetq-commits mailing list