diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2017-03-15 22:20:39 +0100 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2017-03-16 06:29:06 +0100 |
commit | 60e6b93ead4df30f24dc08d92ddcf4e0c04a8ec4 (patch) | |
tree | c4462551b282d3e74f874752aa10fbff7e9cabb0 /id/server/idserverlib/src | |
parent | 583b352de3eda9dd57f427c9d59aa1c395f182a2 (diff) | |
download | moa-id-spss-60e6b93ead4df30f24dc08d92ddcf4e0c04a8ec4.tar.gz moa-id-spss-60e6b93ead4df30f24dc08d92ddcf4e0c04a8ec4.tar.bz2 moa-id-spss-60e6b93ead4df30f24dc08d92ddcf4e0c04a8ec4.zip |
Fix bug in statistic logger that broke the authentication process on some protocols if database persist operation failes
Diffstat (limited to 'id/server/idserverlib/src')
-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); + + } } } |