Author: shawkins
Date: 2009-07-23 17:06:42 -0400 (Thu, 23 Jul 2009)
New Revision: 1180
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
Log:
TEIID-733 changing from a shutdown to a shutdownnow in dqpcore to help ensure that workers
do not see invalid states
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-07-23
20:52:39 UTC (rev 1179)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2009-07-23
21:06:42 UTC (rev 1180)
@@ -156,14 +156,12 @@
private ServiceLoader loader = new ServiceLoader();
/**
- * perform a graceful shutdown by allowing in process work to complete
- * TODO: this is not quite correct from a request perspective, since we need to
re-queue in many instances,
- * which will now result in an exception
+ * perform a full shutdown and wait for 10 seconds for all threads to finish
* @throws ApplicationLifecycleException
*/
@Override
public void stop() throws ApplicationLifecycleException {
- processWorkerPool.shutdown();
+ processWorkerPool.shutdownNow();
try {
processWorkerPool.awaitTermination(10, TimeUnit.SECONDS);
} catch (InterruptedException e) {
Show replies by date