aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2017-03-15 22:20:39 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2017-03-15 22:20:39 +0100
commit0a161a07b208a4ad88b301e09471cb0ba74502ad (patch)
tree2b08fcea9bc47630c57c08ef7f1b4bfee2b5672c /id/server/idserverlib/src/main
parentb326ffa051a3376b5d94ebb14e78aed4b93d06c6 (diff)
downloadmoa-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/server/idserverlib/src/main')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java27
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);
+
+ }
}
}