aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/module-monitoring/src
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/modules/module-monitoring/src')
-rw-r--r--id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java6
-rw-r--r--id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java4
-rw-r--r--id/server/modules/module-monitoring/src/main/resources/moaid_monitoring.beans.xml3
3 files changed, 9 insertions, 4 deletions
diff --git a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java
index b6d217e4c..8ae1850ce 100644
--- a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java
+++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java
@@ -41,8 +41,10 @@ import at.gv.egovernment.moa.util.MiscUtil;
public class DatabaseTestModule implements TestModuleInterface{
private MOASessionDBUtils dbUtils;
+ private StatisticLogDBUtils statLogUtils;
- public DatabaseTestModule(MOASessionDBUtils dbUtils){
+ public DatabaseTestModule(MOASessionDBUtils dbUtils, StatisticLogDBUtils statLogUtils){
+ this.statLogUtils = statLogUtils;
this.dbUtils = dbUtils;
}
@@ -112,7 +114,7 @@ public class DatabaseTestModule implements TestModuleInterface{
Date expioredate = new Date(new Date().getTime() - 120);
try {
- Session session = StatisticLogDBUtils.getCurrentSession();
+ Session session = statLogUtils.getCurrentSession();
List<StatisticLog> results;
diff --git a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java
index b5ccd73f6..4224fae59 100644
--- a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java
+++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java
@@ -32,12 +32,14 @@ import org.springframework.beans.factory.annotation.Autowired;
import at.gv.egovernment.moa.id.commons.api.AuthConfiguration;
import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException;
import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils;
+import at.gv.egovernment.moa.id.commons.db.StatisticLogDBUtils;
import at.gv.egovernment.moa.logging.Logger;
import at.gv.egovernment.moa.util.FileUtils;
public class TestManager{
@Autowired private MOASessionDBUtils moaSessionDBUtils;
+ @Autowired(required=false) private StatisticLogDBUtils statisticLogDBUtils = null;
@Autowired private AuthConfiguration authConfig;
private Map<String, TestModuleInterface> tests = new HashMap<String, TestModuleInterface>();
@@ -92,7 +94,7 @@ public class TestManager{
Logger.debug("Start initializing MOA-ID-Auth TestManager");
//add Database test
- DatabaseTestModule test1 = new DatabaseTestModule(this.moaSessionDBUtils);
+ DatabaseTestModule test1 = new DatabaseTestModule(this.moaSessionDBUtils, this.statisticLogDBUtils);
tests.put(test1.getName(), test1);
//add IdentityLink verification test
diff --git a/id/server/modules/module-monitoring/src/main/resources/moaid_monitoring.beans.xml b/id/server/modules/module-monitoring/src/main/resources/moaid_monitoring.beans.xml
index 41fab4444..6c195e7d7 100644
--- a/id/server/modules/module-monitoring/src/main/resources/moaid_monitoring.beans.xml
+++ b/id/server/modules/module-monitoring/src/main/resources/moaid_monitoring.beans.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
+<beans
+ xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"