Author: nfilotto
Date: 2011-05-09 15:05:55 -0400 (Mon, 09 May 2011)
New Revision: 4348
Added:
ws/branches/2.1.x/patch/2.1.9-GA/WS-265/
ws/branches/2.1.x/patch/2.1.9-GA/WS-265/WS-265.patch
Log:
WS-265: commiting the actual patch for 2.1.9-GA
Added: ws/branches/2.1.x/patch/2.1.9-GA/WS-265/WS-265.patch
===================================================================
--- ws/branches/2.1.x/patch/2.1.9-GA/WS-265/WS-265.patch (rev 0)
+++ ws/branches/2.1.x/patch/2.1.9-GA/WS-265/WS-265.patch 2011-05-09 19:05:55 UTC (rev
4348)
@@ -0,0 +1,47 @@
+Index:
exo.ws.frameworks.servlet/src/main/java/org/exoplatform/ws/frameworks/servlet/StandaloneContainerInitializedListener.java
+===================================================================
+---
exo.ws.frameworks.servlet/src/main/java/org/exoplatform/ws/frameworks/servlet/StandaloneContainerInitializedListener.java (revision
4346)
++++
exo.ws.frameworks.servlet/src/main/java/org/exoplatform/ws/frameworks/servlet/StandaloneContainerInitializedListener.java (working
copy)
+@@ -19,7 +19,6 @@
+ package org.exoplatform.ws.frameworks.servlet;
+
+ import org.exoplatform.container.StandaloneContainer;
+-import org.exoplatform.container.configuration.ConfigurationManagerImpl;
+ import org.exoplatform.services.log.ExoLogger;
+ import org.exoplatform.services.log.Log;
+ import org.exoplatform.services.naming.InitialContextInitializer;
+@@ -80,13 +79,25 @@
+ LOG.error("Error of configurationURL read", e);
+ }
+
++ // If no configuration in web.xml check system property.
++ if (configurationURL == null)
++ configurationURL = System.getProperty(CONF_URL_PARAMETER);
++
+ try
+ {
+ StandaloneContainer.addConfigurationURL(configurationURL);
+ }
+ catch (MalformedURLException e)
+ {
+- LOG.error("Error of addConfigurationURL", e);
++ // Try to use path, we do not need have full path (file:/path/conf) to
configuration. Any relative path is OK.
++ try
++ {
++ StandaloneContainer.addConfigurationPath(configurationURL);
++ }
++ catch (MalformedURLException e2)
++ {
++ LOG.error("Error of addConfiguration", e2);
++ }
+ }
+
+ try
+@@ -116,6 +127,6 @@
+ */
+ public void contextDestroyed(ServletContextEvent event)
+ {
+- // container.stop();
++ container.stop();
+ }
+ }