Author: clebert.suconic(a)jboss.com
Date: 2009-11-21 01:21:18 -0500 (Sat, 21 Nov 2009)
New Revision: 8359
Modified:
branches/ClebertTemporary/native/bin/libHornetQAIO64.so
branches/ClebertTemporary/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java
branches/ClebertTemporary/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
Fixing tests
Modified: branches/ClebertTemporary/native/bin/libHornetQAIO64.so
===================================================================
(Binary files differ)
Modified:
branches/ClebertTemporary/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java
===================================================================
---
branches/ClebertTemporary/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java 2009-11-21
05:52:58 UTC (rev 8358)
+++
branches/ClebertTemporary/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java 2009-11-21
06:21:18 UTC (rev 8359)
@@ -21,7 +21,9 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
import javax.management.MBeanServer;
import javax.management.NotificationBroadcasterSupport;
@@ -39,6 +41,7 @@
import org.hornetq.core.config.cluster.DiscoveryGroupConfiguration;
import org.hornetq.core.config.cluster.DivertConfiguration;
import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.journal.IOAsyncTask;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.management.AcceptorControl;
import org.hornetq.core.management.BridgeControl;
@@ -56,6 +59,7 @@
import org.hornetq.core.messagecounter.impl.MessageCounterManagerImpl;
import org.hornetq.core.paging.PagingManager;
import org.hornetq.core.persistence.StorageManager;
+import org.hornetq.core.persistence.impl.journal.OperationContextImpl;
import org.hornetq.core.postoffice.PostOffice;
import org.hornetq.core.remoting.server.RemotingService;
import org.hornetq.core.remoting.spi.Acceptor;
@@ -736,6 +740,29 @@
}
}
}
+
+ // TODO: Talk to Andy and Jeff about a better way to sync this...
+ System.out.println("Waiting");
+ final CountDownLatch latch = new CountDownLatch(1);
+ OperationContextImpl.getContext().executeOnCompletion(new IOAsyncTask()
+ {
+
+ public void done()
+ {
+ System.out.println("Done on management");
+ latch.countDown();
+ }
+
+ public void onError(int errorCode, String errorMessage)
+ {
+ }
+
+ });
+
+ OperationContextImpl.getContext().complete();
+
+ latch.await(5, TimeUnit.SECONDS);
+ System.out.println("Done");
}
public void enableNotifications(boolean enabled)
Modified:
branches/ClebertTemporary/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
---
branches/ClebertTemporary/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-11-21
05:52:58 UTC (rev 8358)
+++
branches/ClebertTemporary/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-11-21
06:21:18 UTC (rev 8359)
@@ -374,6 +374,11 @@
managementService.stop();
+ if (storageManager != null)
+ {
+ storageManager.stop();
+ }
+
if (replicationEndpoint != null)
{
replicationEndpoint.stop();
@@ -403,16 +408,15 @@
{
log.debug("Waiting for " + task);
}
-
- threadPool.shutdown();
- threadPool.awaitTermination(60, TimeUnit.SECONDS);
-
- if (storageManager != null)
+ if (replicationManager != null)
{
- storageManager.stop();
+ replicationManager.stop();
+ replicationManager = null;
}
+ threadPool.shutdown();
+
scheduledPool = null;
if (pagingManager != null)
Show replies by date