Author: shawkins
Date: 2009-05-30 09:02:35 -0400 (Sat, 30 May 2009)
New Revision: 1013
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
Log:
TEIID-635 preventing the last embedded worker from seeing a stopped cache
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2009-05-29
21:23:05 UTC (rev 1012)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2009-05-30
13:02:35 UTC (rev 1013)
@@ -32,6 +32,7 @@
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
import javax.transaction.InvalidTransactionException;
import javax.transaction.SystemException;
@@ -168,6 +169,10 @@
@Override
public void stop() throws ApplicationLifecycleException {
processWorkerPool.shutdown();
+ try {
+ processWorkerPool.awaitTermination(10, TimeUnit.SECONDS);
+ } catch (InterruptedException e) {
+ }
contextCache.shutdown();
super.stop();
}
Show replies by date