diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-27 15:12:28 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-27 15:12:28 +1300 |
commit | 7db2eb1ad224bf00608ebbcfe13bfa7fd519a7fc (patch) | |
tree | 60840d3b8b39c07802e8c65fee10e8222f992435 /src/org/traccar/Context.java | |
parent | 6eab101b0070cf5af8fd9e177a2a3ba40e5e836c (diff) | |
download | trackermap-server-7db2eb1ad224bf00608ebbcfe13bfa7fd519a7fc.tar.gz trackermap-server-7db2eb1ad224bf00608ebbcfe13bfa7fd519a7fc.tar.bz2 trackermap-server-7db2eb1ad224bf00608ebbcfe13bfa7fd519a7fc.zip |
Host database console using Jetty
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r-- | src/org/traccar/Context.java | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java index 675465aff..c833d0c2e 100644 --- a/src/org/traccar/Context.java +++ b/src/org/traccar/Context.java @@ -16,8 +16,6 @@ package org.traccar; import com.ning.http.client.AsyncHttpClient; -import org.h2.server.web.ConnectionInfo; -import org.h2.tools.Server; import org.traccar.database.ConnectionManager; import org.traccar.database.DataManager; import org.traccar.database.IdentityManager; @@ -36,8 +34,6 @@ import org.traccar.location.MozillaLocationProvider; import org.traccar.location.OpenCellIdLocationProvider; import org.traccar.web.WebServer; -import java.lang.reflect.Method; - public final class Context { private Context() { @@ -97,12 +93,6 @@ public final class Context { return webServer; } - private static Server databaseConsole; - - public static Server getDatabaseConsole() { - return databaseConsole; - } - private static ServerManager serverManager; public static ServerManager getServerManager() { @@ -185,20 +175,6 @@ public final class Context { webServer = new WebServer(config, dataManager.getDataSource()); } - if (config.getBoolean("console.enable")) { - databaseConsole = Server.createWebServer("-webPort", config.getString("console.port")); - org.h2.server.web.WebServer databaseService = (org.h2.server.web.WebServer) databaseConsole.getService(); - - ConnectionInfo connectionInfo = new ConnectionInfo("Traccar|" - + config.getString("database.driver") + "|" - + config.getString("database.url") + "|" - + config.getString("database.user")); - - Method method = databaseService.getClass().getDeclaredMethod("updateSetting", ConnectionInfo.class); - method.setAccessible(true); - method.invoke(databaseService, connectionInfo); - } - connectionManager = new ConnectionManager(dataManager); serverManager = new ServerManager(); |