[Yanel-commits] rev 28360 -
public/yanel/trunk/src/core/java/org/wyona/yanel/core/map
michi at wyona.com
michi at wyona.com
Thu Nov 1 16:43:27 CET 2007
Author: michi
Date: 2007-11-01 16:43:26 +0100 (Thu, 01 Nov 2007)
New Revision: 28360
Modified:
public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Realm.java
Log:
repo config fixed
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Realm.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Realm.java 2007-11-01 15:42:54 UTC (rev 28359)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Realm.java 2007-11-01 15:43:26 UTC (rev 28360)
@@ -81,7 +81,7 @@
proxySet = false;
if (configFile != null) {
- DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
+ DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(true);
Configuration config;
try {
config = builder.buildFromFile(configFile);
@@ -111,10 +111,6 @@
// Set PolicyManager for this realm
Configuration repoConfigElement = config.getChild("ac-policies", false);
if (repoConfigElement != null) {
- repoConfig = FileUtil.resolve(getConfigFile(), new File(repoConfigElement.getValue()));
- RepositoryFactory policiesRepoFactory = yanel.getRepositoryFactory("ACPoliciesRepositoryFactory");
- Repository policiesRepo = policiesRepoFactory.newRepository(getID(), repoConfig);
-
PolicyManagerFactory pmFactory = null;
PolicyManager policyManager = null;
try {
@@ -124,6 +120,9 @@
} catch (ConfigurationException e) {
pmFactory = (PolicyManagerFactory) yanel.getBeanFactory().getBean("PolicyManagerFactory");
log.warn("Default PolicyManager will be used for realm: " + getName());
+ repoConfig = FileUtil.resolve(getConfigFile(), new File(repoConfigElement.getValue()));
+ RepositoryFactory policiesRepoFactory = yanel.getRepositoryFactory("ACPoliciesRepositoryFactory");
+ Repository policiesRepo = policiesRepoFactory.newRepository(getID(), repoConfig);
policyManager = pmFactory.newPolicyManager(policiesRepo);
}
setPolicyManager(policyManager);
@@ -133,9 +132,6 @@
// Set IdentityManager for this realm
repoConfigElement = config.getChild("ac-identities", false);
if (repoConfigElement != null) {
- repoConfig = FileUtil.resolve(getConfigFile(), new File(repoConfigElement.getValue()));
- RepositoryFactory identitiesRepoFactory = yanel.getRepositoryFactory("ACIdentitiesRepositoryFactory");
- Repository identitiesRepo = identitiesRepoFactory.newRepository(getID(), repoConfig);
IdentityManagerFactory imFactory = null;
IdentityManager identityManager = null;
@@ -146,6 +142,9 @@
} catch (ConfigurationException e) {
imFactory = (IdentityManagerFactory) yanel.getBeanFactory().getBean("IdentityManagerFactory");
log.warn("Default IdentityManager will be used for realm: " + getName());
+ repoConfig = FileUtil.resolve(getConfigFile(), new File(repoConfigElement.getValue()));
+ RepositoryFactory identitiesRepoFactory = yanel.getRepositoryFactory("ACIdentitiesRepositoryFactory");
+ Repository identitiesRepo = identitiesRepoFactory.newRepository(getID(), repoConfig);
identityManager = imFactory.newIdentityManager(identitiesRepo);
}
setIdentityManager(identityManager);
More information about the Yanel-commits
mailing list