]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server.ui/src/org/simantics/maps/server/ui/Activator.java
Adding pkg-precompiled tileserver-mapnik to avoid npm install
[simantics/district.git] / org.simantics.maps.server.ui / src / org / simantics / maps / server / ui / Activator.java
index 4c1c9637941488b8560b4d66f708e68a64315ca9..78b2e7b24118b0a793be76d4ad26074e073c8349 100644 (file)
@@ -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;
     }