[exo-jcr-commits] exo-jcr SVN: r4172 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Mar 25 03:41:56 EDT 2011
Author: tolusha
Date: 2011-03-25 03:41:56 -0400 (Fri, 25 Mar 2011)
New Revision: 4172
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/RepositoryServiceConfigurationImpl.java
Log:
EXOJCR-1233: first merge from base configuration
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/RepositoryServiceConfigurationImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/RepositoryServiceConfigurationImpl.java 2011-03-25 07:10:50 UTC (rev 4171)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/RepositoryServiceConfigurationImpl.java 2011-03-25 07:41:56 UTC (rev 4172)
@@ -283,50 +283,33 @@
{
try
{
- if ((configurationPersister != null && configurationPersister.hasConfig()))
+ if (configurationPersister != null && configurationPersister.hasConfig())
{
- initFromStream(configurationService.getInputStream(param.getValue()));
-
- // Will be merged extension repository configuration with configuration from persister.
- if (!configExtensionPaths.isEmpty())
- {
- String[] paths = configExtensionPaths.toArray(new String[configExtensionPaths.size()]);
- for (int i = paths.length - 1; i >= 0; i--)
- {
- merge(configurationService.getInputStream(paths[i]));
- }
- }
+ init(configurationPersister.read());
merge(configurationService.getInputStream(param.getValue()));
-
- // Store the merged configuration
- if (configurationPersister != null)
- {
- retain();
- }
}
else
{
+ init(configurationService.getInputStream(param.getValue()));
+ }
+ // Will be merged extension repository configuration
+ if (!configExtensionPaths.isEmpty())
+ {
+ // We start from the last one because as it is the one with highest priority
String[] paths = configExtensionPaths.toArray(new String[configExtensionPaths.size()]);
for (int i = paths.length - 1; i >= 0; i--)
{
- // We start from the last one because as it is the one with highest priorityn
- if (i == paths.length - 1)
- {
- init(configurationService.getInputStream(paths[i]));
- }
- else
- {
- merge(configurationService.getInputStream(paths[i]));
- }
+ merge(configurationService.getInputStream(paths[i]));
}
- merge(configurationService.getInputStream(param.getValue()));
- // Store the merged configuration
- if (configurationPersister != null && !configurationPersister.hasConfig())
- {
- retain();
- }
}
+
+ // Store the merged configuration
+ if (configurationPersister != null)
+ {
+ retain();
+ }
+
}
catch (RepositoryConfigurationException e)
{
More information about the exo-jcr-commits
mailing list