diff options
author | Christian Maierhofer <cmaierhofer@iaik.tugraz.at> | 2016-06-28 13:47:52 +0200 |
---|---|---|
committer | Christian Maierhofer <cmaierhofer@iaik.tugraz.at> | 2016-06-28 13:47:52 +0200 |
commit | 7717d75918fb63ee7e9d7bf31de2696577b7e991 (patch) | |
tree | 789f089649f27825e5570b8f6a0675474de5e6a5 /id/server/modules | |
parent | 0d4863abf480dd35d5ffa87f09604096aae905bc (diff) | |
download | moa-id-spss-7717d75918fb63ee7e9d7bf31de2696577b7e991.tar.gz moa-id-spss-7717d75918fb63ee7e9d7bf31de2696577b7e991.tar.bz2 moa-id-spss-7717d75918fb63ee7e9d7bf31de2696577b7e991.zip |
statisticlogger dbcp connection pool
Diffstat (limited to 'id/server/modules')
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" |