diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2017-03-15 22:20:39 +0100 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2017-03-15 22:20:39 +0100 |
commit | 0a161a07b208a4ad88b301e09471cb0ba74502ad (patch) | |
tree | 2b08fcea9bc47630c57c08ef7f1b4bfee2b5672c /id | |
parent | b326ffa051a3376b5d94ebb14e78aed4b93d06c6 (diff) | |
download | moa-id-spss-0a161a07b208a4ad88b301e09471cb0ba74502ad.tar.gz moa-id-spss-0a161a07b208a4ad88b301e09471cb0ba74502ad.tar.bz2 moa-id-spss-0a161a07b208a4ad88b301e09471cb0ba74502ad.zip |
Fix bug in statistic logger that broke the authentication process on some protocols if database persist operation failes
Diffstat (limited to 'id')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java index 5b0f5115d..dfea14a72 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java @@ -205,8 +205,14 @@ public class StatisticLogger implements IStatisticLogger{ } } } - - entityManager.persist(dblog); + + try { + entityManager.persist(dblog); + + } catch (Exception e) { + Logger.warn("Write 'success' statisticLog to database FAILED.", e); + + } } } @@ -227,8 +233,13 @@ public class StatisticLogger implements IStatisticLogger{ } - - entityManager.persist(dblog); + try { + entityManager.persist(dblog); + + } catch (Exception e) { + Logger.warn("Write 'error' statisticLog to database FAILED.", e); + + } } @@ -282,7 +293,13 @@ public class StatisticLogger implements IStatisticLogger{ generateErrorLogFormThrowable(throwable, dblog); - entityManager.persist(dblog); + try { + entityManager.persist(dblog); + + } catch (Exception e) { + Logger.warn("Write 'error' statisticLog to database FAILED.", e); + + } } } |