Author: borges
Date: 2011-09-13 10:43:29 -0400 (Tue, 13 Sep 2011)
New Revision: 11343
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingManagerImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java
Log:
FIX dead-lock: Mark PagingStore as closed, before trying to stop SubscriptionProviders
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java 2011-09-13
14:42:49 UTC (rev 11342)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java 2011-09-13
14:43:29 UTC (rev 11343)
@@ -350,6 +350,12 @@
break;
}
}
+
+ if (!pagingStore.isStarted())
+ {
+ return;
+ }
+
if (complete)
{
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingManagerImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingManagerImpl.java 2011-09-13
14:42:49 UTC (rev 11342)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingManagerImpl.java 2011-09-13
14:43:29 UTC (rev 11343)
@@ -227,18 +227,18 @@
}
}
- public void stop() throws Exception
+ public synchronized void stop() throws Exception
{
+ if (!started)
+ {
+ return;
+ }
+ started = false;
+
lock();
try
{
- if (!started)
- {
- return;
- }
- started = false;
-
for (PagingStore store : stores.values())
{
store.stop();
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java 2011-09-13
14:42:49 UTC (rev 11342)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java 2011-09-13
14:43:29 UTC (rev 11343)
@@ -391,10 +391,10 @@
{
if (running)
{
+ running = false;
+
cursorProvider.stop();
- running = false;
-
flushExecutors();
if (currentPage != null)
Show replies by date