[exo-jcr-commits] exo-jcr SVN: r5198 - in kernel/branches/2.2.x/patch/2.2.11-GA: KER-180 and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Nov 17 09:08:02 EST 2011
Author: areshetnyak
Date: 2011-11-17 09:08:02 -0500 (Thu, 17 Nov 2011)
New Revision: 5198
Added:
kernel/branches/2.2.x/patch/2.2.11-GA/KER-180/
kernel/branches/2.2.x/patch/2.2.11-GA/KER-180/KER-180.patch
Log:
KER-180 : Changes for the kernel from issue JCR-1689 was commited in patch KER-180.patch.
Added: kernel/branches/2.2.x/patch/2.2.11-GA/KER-180/KER-180.patch
===================================================================
--- kernel/branches/2.2.x/patch/2.2.11-GA/KER-180/KER-180.patch (rev 0)
+++ kernel/branches/2.2.x/patch/2.2.11-GA/KER-180/KER-180.patch 2011-11-17 14:08:02 UTC (rev 5198)
@@ -0,0 +1,76 @@
+Index: exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java
+===================================================================
+--- exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java (revision 5185)
++++ exo.kernel.container/src/main/java/org/exoplatform/container/PropertyConfigurator.java (working copy)
+@@ -62,32 +62,38 @@
+ /** The logger. */
+ private final Log log = ExoLogger.getExoLogger(PropertyConfigurator.class);
+
++ public PropertyConfigurator(ConfigurationManager confManager)
++ {
++ this(null, confManager);
++ }
++
+ public PropertyConfigurator(InitParams params, ConfigurationManager confManager)
+ {
+- PropertiesParam propertiesParam = params.getPropertiesParam("properties");
+- if (propertiesParam != null)
++ String path = null;
++ if (params != null)
+ {
+- log.debug("Going to initialize properties from init param");
+- for (Iterator<Property> i = propertiesParam.getPropertyIterator();i.hasNext();)
++ PropertiesParam propertiesParam = params.getPropertiesParam("properties");
++ if (propertiesParam != null)
+ {
+- Property property = i.next();
+- String name = property.getName();
+- String value = property.getValue();
+- log.debug("Adding property from init param " + name + " = " + value);
+- PropertyManager.setProperty(name, value);
++ log.debug("Going to initialize properties from init param");
++ for (Iterator<Property> i = propertiesParam.getPropertyIterator();i.hasNext();)
++ {
++ Property property = i.next();
++ String name = property.getName();
++ String value = property.getValue();
++ log.debug("Adding property from init param " + name + " = " + value);
++ PropertyManager.setProperty(name, value);
++ }
++ }
++ ValueParam pathParam = params.getValueParam("properties.url");
++ if (pathParam != null)
++ {
++ log.debug("Using file path " + path + " found from configuration");
++ path = pathParam.getValue();
+ }
+ }
+
+ //
+- String path = null;
+- ValueParam pathParam = params.getValueParam("properties.url");
+- if (pathParam != null)
+- {
+- log.debug("Using file path " + path + " found from configuration");
+- path = pathParam.getValue();
+- }
+-
+- //
+ String systemPath = PropertyManager.getProperty(PropertyManager.PROPERTIES_URL);
+ if (systemPath != null)
+ {
+Index: exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java
+===================================================================
+--- exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java (revision 5185)
++++ exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java (working copy)
+@@ -82,6 +82,10 @@
+ configurationManager = new ConfigurationManagerImpl(configClassLoader, ExoContainer.getProfiles());
+ this.registerComponentInstance(ConfigurationManager.class, configurationManager);
+ registerComponentImplementation(SessionManagerImpl.class);
++ // Workaround used to allow to use the PropertyConfigurator with the StandaloneContainer
++ // If the system property PropertyManager.PROPERTIES_URL has been set properly, it will load the properties
++ // from the file and load them as system properties
++ new PropertyConfigurator(configurationManager);
+ }
+
+ /**
More information about the exo-jcr-commits
mailing list