aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2013-09-26 07:19:58 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2013-09-26 07:19:58 +0200
commit0773942456e68cf5560655b1bd782ab792c66251 (patch)
treeae8f8d24e5af2d0c3669ad91b67e4d9a29b20636 /id/server/moa-id-commons
parentcd1a5f3b69f38c1aa7bad2826f2be2df45f75346 (diff)
downloadmoa-id-spss-0773942456e68cf5560655b1bd782ab792c66251.tar.gz
moa-id-spss-0773942456e68cf5560655b1bd782ab792c66251.tar.bz2
moa-id-spss-0773942456e68cf5560655b1bd782ab792c66251.zip
BugFix:
-- MOAMetadataProvider.java: Destroy HTTPMetadataProvider and Timer manually if an Exception occurs -- ConfigurationDBRead.java: select OA with OAIdentifier (PublicPrefix) has matched to more then one OA in some special case.
Diffstat (limited to 'id/server/moa-id-commons')
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java11
1 files changed, 8 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 47136d162..038dcb6cf 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
@@ -20,8 +20,8 @@ public class ConfigurationDBRead {
private static Map<String, String> QUERIES = new HashMap<String, String>();
static {
- QUERIES.put("getActiveOnlineApplicationWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.publicURLPrefix like SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix)) and onlineapplication.isActive = '1'");
- QUERIES.put("getOnlineApplicationWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.publicURLPrefix like SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix))");
+ QUERIES.put("getActiveOnlineApplicationWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.publicURLPrefix = SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix)) and onlineapplication.isActive = '1'");
+ QUERIES.put("getOnlineApplicationWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.publicURLPrefix = SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix))");
QUERIES.put("getOnlineApplicationWithDBID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.hjid = :id");
QUERIES.put("getAllOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication");
QUERIES.put("getAllActiveOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.isActive = '1'");
@@ -52,7 +52,12 @@ public class ConfigurationDBRead {
Logger.trace("Found entries: " + result.size());
if (result.size() == 0) {
- Logger.trace("No entries found.");
+ Logger.debug("No entries found.");
+ return null;
+ }
+
+ if (result.size() > 1) {
+ Logger.warn("OAIdentifier match to more then one DB-entry!");
return null;
}