diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-06-09 10:38:10 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-06-09 10:38:10 +1200 |
commit | 3627e1522efe5870a5efc14a1c6bae9fad615840 (patch) | |
tree | 46b2836871fac8cac0011f350dc8a7b165d3f185 | |
parent | cbc7ebd663ad71b1ff5882ffa3dd920c9c81b60d (diff) | |
download | trackermap-server-3627e1522efe5870a5efc14a1c6bae9fad615840.tar.gz trackermap-server-3627e1522efe5870a5efc14a1c6bae9fad615840.tar.bz2 trackermap-server-3627e1522efe5870a5efc14a1c6bae9fad615840.zip |
Default connection initialization query
-rw-r--r-- | debug.xml | 4 | ||||
-rw-r--r-- | setup/unix/traccar.xml | 4 | ||||
-rw-r--r-- | setup/windows/traccar.xml | 4 | ||||
-rw-r--r-- | src/org/traccar/database/DataManager.java | 2 |
4 files changed, 1 insertions, 13 deletions
@@ -54,10 +54,6 @@ <entry key='database.changelog'>./database/changelog-master.xml</entry> - <entry key='database.checkConnection'> - SELECT 1; - </entry> - <entry key='database.selectServers'> SELECT * FROM server; </entry> diff --git a/setup/unix/traccar.xml b/setup/unix/traccar.xml index 4188bc422..4103634ac 100644 --- a/setup/unix/traccar.xml +++ b/setup/unix/traccar.xml @@ -33,10 +33,6 @@ <entry key='database.changelog'>/opt/traccar/data/changelog-master.xml</entry> - <entry key='database.checkConnection'> - SELECT 1; - </entry> - <entry key='database.selectServers'> SELECT * FROM server; </entry> diff --git a/setup/windows/traccar.xml b/setup/windows/traccar.xml index 767d1dc84..5748f3993 100644 --- a/setup/windows/traccar.xml +++ b/setup/windows/traccar.xml @@ -33,10 +33,6 @@ <entry key='database.changelog'>[CHANGELOG]</entry>
- <entry key='database.checkConnection'>
- SELECT 1;
- </entry>
-
<entry key='database.selectServers'>
SELECT * FROM server;
</entry>
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index 4e69d1d8e..67b7d1e55 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -117,7 +117,7 @@ public class DataManager implements IdentityManager { hikariConfig.setJdbcUrl(config.getString("database.url")); hikariConfig.setUsername(config.getString("database.user")); hikariConfig.setPassword(config.getString("database.password")); - hikariConfig.setConnectionInitSql(config.getString("database.checkConnection")); + hikariConfig.setConnectionInitSql(config.getString("database.checkConnection", "SELECT 1")); hikariConfig.setIdleTimeout(600000); int maxPoolSize = config.getInteger("database.maxPoolSize"); |