This commit is contained in:
Wolfgang Hottgenroth
2017-11-23 16:22:01 +01:00
parent 3bc7fe2531
commit 465fdd46bf
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
db.period = 3600
db.period = 10
db.url = jdbc:mysql://localhost/smarthome
db.driver = com.mysql.jdbc.Driver
db.user = smarthome

View File

@ -128,6 +128,7 @@ public class DatabaseEngine extends Thread implements ITriggerable {
HashMap<String, PreparedStatement> preparedStatements = new HashMap<String, PreparedStatement>();
try {
int itemCnt = 0;
dbCon = DriverManager.getConnection(dbUrl, dbUsername, dbPassword);
while (true) {
try {
@ -136,7 +137,6 @@ public class DatabaseEngine extends Thread implements ITriggerable {
logger.warn("DatabaseEngine found no data");
break;
}
dbCon = DriverManager.getConnection(dbUrl, dbUsername, dbPassword);
String key = ado.getClass().getName();
PreparedStatement pstmt;