aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/Main.java')
-rw-r--r--src/main/java/org/traccar/Main.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/Main.java b/src/main/java/org/traccar/Main.java
index 016365837..db9892bb9 100644
--- a/src/main/java/org/traccar/Main.java
+++ b/src/main/java/org/traccar/Main.java
@@ -19,6 +19,7 @@ import com.google.inject.Guice;
import com.google.inject.Injector;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.traccar.schedule.ScheduleManager;
import java.io.File;
import java.lang.management.ManagementFactory;
@@ -117,9 +118,9 @@ public final class Main {
LOGGER.info("Starting server...");
List<LifecycleObject> services = new LinkedList<>();
- services.add(Context.getServerManager());
+ services.add(injector.getInstance(ServerManager.class));
services.add(Context.getWebServer());
- services.add(Context.getScheduleManager());
+ services.add(injector.getInstance(ScheduleManager.class));
services.add(Context.getBroadcastService());
for (LifecycleObject service : services) {