aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-10-24 18:31:03 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-10-24 18:31:03 +0200
commit514c74b95022c7ea9b424cbbe1276bb1c700a065 (patch)
tree8db2abf3ad3a780f242cab9fed953c238bb3d425
parent586d34ea9daf52a9502077cdd40a8c12a21dc96f (diff)
downloadmoa-id-spss-514c74b95022c7ea9b424cbbe1276bb1c700a065.tar.gz
moa-id-spss-514c74b95022c7ea9b424cbbe1276bb1c700a065.tar.bz2
moa-id-spss-514c74b95022c7ea9b424cbbe1276bb1c700a065.zip
synchronize Metadata provider reload operation
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/metadata/MOAMetadataProvider.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/metadata/MOAMetadataProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/metadata/MOAMetadataProvider.java
index 5c2778b89..b2597c3cb 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/metadata/MOAMetadataProvider.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/metadata/MOAMetadataProvider.java
@@ -142,8 +142,17 @@ public class MOAMetadataProvider extends SimpleMOAMetadataProvider
@Override
- public boolean refreshMetadataProvider(String entityID) {
- try {
+ public synchronized boolean refreshMetadataProvider(String entityID) {
+ try {
+ //check if metadata provider is already loaded
+ try {
+ if (internalProvider.getEntityDescriptor(entityID) != null)
+ return true;
+
+ } catch (MetadataProviderException e) {}
+
+
+ //reload metadata provider
IOAAuthParameters oaParam =
AuthConfigurationProviderFactory.getInstance().getOnlineApplicationParameter(entityID);
if (oaParam != null) {