X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.maps.server.ui%2Fsrc%2Forg%2Fsimantics%2Fmaps%2Fserver%2Fui%2FActivator.java;fp=org.simantics.maps.server.ui%2Fsrc%2Forg%2Fsimantics%2Fmaps%2Fserver%2Fui%2FActivator.java;h=78b2e7b24118b0a793be76d4ad26074e073c8349;hb=7ab15b0d6830bf2f60116c435b22766139ba8f37;hp=4c1c9637941488b8560b4d66f708e68a64315ca9;hpb=fab0b23a6127c7d7081556d59dcf1080d043dd90;p=simantics%2Fdistrict.git diff --git a/org.simantics.maps.server.ui/src/org/simantics/maps/server/ui/Activator.java b/org.simantics.maps.server.ui/src/org/simantics/maps/server/ui/Activator.java index 4c1c9637..78b2e7b2 100644 --- a/org.simantics.maps.server.ui/src/org/simantics/maps/server/ui/Activator.java +++ b/org.simantics.maps.server.ui/src/org/simantics/maps/server/ui/Activator.java @@ -31,13 +31,9 @@ public class Activator implements BundleActivator { // Let's see if server should be automatically started if (MapsServerPreferences.startAutomatically()) { // execute in a separate thread to not slow down the startup process - new Thread(() -> { - try { - TileserverMapnikInstance.get().start(); - } catch (Throwable t) { - LOGGER.error("Could not start integrated tile server", t); - } - }).start(); + if (LOGGER.isDebugEnabled()) + LOGGER.debug("Starting tileserver mapnik automatically"); + new TileserverMapnikStartJob().schedule(); } } @@ -49,6 +45,8 @@ public class Activator implements BundleActivator { */ public void stop(BundleContext bundleContext) throws Exception { // Stop the server + if (LOGGER.isDebugEnabled()) + LOGGER.debug("Stopping tileserver mapnik"); TileserverMapnikInstance.get().stop(); Activator.context = null; }