aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main/java/at
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-07-07 14:27:08 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-07-07 14:27:08 +0200
commit85d5d9885979ca298f3d83699a07f7c5c234bec7 (patch)
treed273ccd77d098bde8f698fec0e78c0470e21e05c /id/server/moa-id-commons/src/main/java/at
parentb6b155c4d55a31a13d189f50831fb7fa8c504b90 (diff)
parentf595cb0d46358e44fad838dd01a449e40c52e18b (diff)
downloadmoa-id-spss-85d5d9885979ca298f3d83699a07f7c5c234bec7.tar.gz
moa-id-spss-85d5d9885979ca298f3d83699a07f7c5c234bec7.tar.bz2
moa-id-spss-85d5d9885979ca298f3d83699a07f7c5c234bec7.zip
Merge remote-tracking branch 'remotes/origin/persistance-fixes' into moa-2.1-Snapshot
Diffstat (limited to 'id/server/moa-id-commons/src/main/java/at')
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java4
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
index 88220cded..e890e2145 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
@@ -147,8 +147,8 @@ public class ConfigurationDBRead {
Logger.trace("Found entries: " + result.size());
if (result.size() == 0) {
- Logger.trace("No entries found.");
- return null;
+ Logger.trace("No entries found. Create fresh instance.");
+ return new MOAIDConfiguration();
}
return (MOAIDConfiguration) result.get(0);
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java
index 6bd987f96..cdb19340d 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java
@@ -154,7 +154,7 @@ public final class ConfigurationDBUtils {
synchronized (session) {
tx.begin();
- session.persist(dbo);
+ session.merge(dbo);
tx.commit();
//session.clear();