Java Code Examples for org.wso2.carbon.user.api.RealmConfiguration#setSecondaryRealmConfig()
The following examples show how to use
org.wso2.carbon.user.api.RealmConfiguration#setSecondaryRealmConfig() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UserStoreConfgurationContextObserver.java From carbon-identity-framework with Apache License 2.0 | 6 votes |
public void terminatingConfigurationContext(ConfigurationContext context) { try { org.wso2.carbon.user.api.UserRealm tenantRealm = CarbonContext .getThreadLocalCarbonContext().getUserRealm(); RealmConfiguration realmConfig = tenantRealm.getRealmConfiguration(); AbstractUserStoreManager userStoreManager = (AbstractUserStoreManager) tenantRealm .getUserStoreManager(); userStoreManager.clearAllSecondaryUserStores(); realmConfig.setSecondaryRealmConfig(null); userStoreManager.setSecondaryUserStoreManager(null); log.info("Unloaded all secondary user stores for tenant " + CarbonContext.getThreadLocalCarbonContext().getTenantId()); } catch (Exception ex) { log.error(ex.getMessage()); } }
Example 2
Source File: UserStoreConfgurationContextObserver.java From carbon-identity with Apache License 2.0 | 6 votes |
public void terminatingConfigurationContext(ConfigurationContext context) { try { org.wso2.carbon.user.api.UserRealm tenantRealm = CarbonContext .getThreadLocalCarbonContext().getUserRealm(); RealmConfiguration realmConfig = tenantRealm.getRealmConfiguration(); AbstractUserStoreManager userStoreManager = (AbstractUserStoreManager) tenantRealm .getUserStoreManager(); userStoreManager.clearAllSecondaryUserStores(); realmConfig.setSecondaryRealmConfig(null); userStoreManager.setSecondaryUserStoreManager(null); log.info("Unloaded all secondary user stores for tenant " + CarbonContext.getThreadLocalCarbonContext().getTenantId()); } catch (Exception ex) { log.error(ex.getMessage()); } }