From 514c74b95022c7ea9b424cbbe1276bb1c700a065 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 24 Oct 2016 18:31:03 +0200 Subject: synchronize Metadata provider reload operation --- .../id/protocols/pvp2x/metadata/MOAMetadataProvider.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'id/server/idserverlib/src') 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) { -- cgit v1.2.3