[icedtea-web] not closeable javaws (and maybe more)
Jiri Vanek
jvanek at redhat.com
Tue Feb 17 10:57:24 UTC 2015
On 02/17/2015 11:00 AM, Jiri Vanek wrote:
> Hi!
>
> Head, for already some time javaws apps needs to be closed by signal kill. For long time I thought this is soem accident or whatever, but it is not.
> Today I tracked it to guilty changeset of http://icedtea.classpath.org/hg/icedtea-web/rev/6f4c1d501560
>
> Looking for the fix now, but in case I fail, this will spare some time to the followr,
>
> J.
Ok, so the caus eis clear, ServiceExecutor do not run as daemon, and so is preventing jvm to stop.
I'm wondering Why I dont see this issue from plugin side...
Anyway - for javaws - both ok and failed run - where to place call to
diff -r a8baec8d9d21 netx/net/sourceforge/jnlp/cache/ResourceTracker.java
--- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Fri Feb 13 12:48:24 2015 +0100
+++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue Feb 17 11:57:01 2015 +0100
@@ -34,6 +34,7 @@
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
import net.sourceforge.jnlp.DownloadOptions;
import net.sourceforge.jnlp.Version;
@@ -633,4 +634,15 @@
interface Filter<T> {
public boolean test(T t);
}
+
+ public static void shutdDownThreadPool() throws InterruptedException{
+ threadPool.shutdown();
+ if (!threadPool.awaitTermination(5, TimeUnit.SECONDS)) {
+ OutputController.getLogger().log("Executor did not terminate in the specified time.");
+ List<Runnable> droppedTasks = threadPool.shutdownNow();
+ OutputController.getLogger().log("Executor was abruptly shut down. " + droppedTasks.size() + " tasks will not be executed.");
+ }
+ }
+
+
}
?
More information about the distro-pkg-dev
mailing list