From 8a38abbae6ee8a75b12418f2d0948287bb1e2715 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 19 May 2016 00:26:34 +0530 Subject: [PATCH] resolving create application issues --- .../impl/DynamicClientRegistrationServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/src/main/java/org/wso2/carbon/dynamic/client/registration/impl/DynamicClientRegistrationServiceImpl.java b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/src/main/java/org/wso2/carbon/dynamic/client/registration/impl/DynamicClientRegistrationServiceImpl.java index b46d5df5507..aae823533ad 100644 --- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/src/main/java/org/wso2/carbon/dynamic/client/registration/impl/DynamicClientRegistrationServiceImpl.java +++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/src/main/java/org/wso2/carbon/dynamic/client/registration/impl/DynamicClientRegistrationServiceImpl.java @@ -82,7 +82,9 @@ public class DynamicClientRegistrationServiceImpl implements DynamicClientRegist oAuthApplicationInfo.addParameter(TOKEN_SCOPE, Arrays.toString(tokenScopes)); OAuthApplicationInfo info; try { - info = this.createOAuthApplication(profile); + synchronized (DynamicClientRegistrationServiceImpl.class) { + info = this.createOAuthApplication(profile); + } } catch (DynamicClientRegistrationException | IdentityException e) { throw new DynamicClientRegistrationException("Can not create OAuth application : " + applicationName, e); }