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;h=14d121013b48e0a725da838014263128da45990e;hb=refs%2Fchanges%2F64%2F3964%2F2;hp=4c1c9637941488b8560b4d66f708e68a64315ca9;hpb=02ecca5e61d2eb17de40cc058be678b414aaad00;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..14d12101 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(status -> {}).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; }