Author: jleroux Date: Thu Aug 8 08:26:11 2013 New Revision: 1511615 URL: http://svn.apache.org/r1511615 Log: r1459222 has not been backported and reported as a bug directly to me by Ruth Unfortunately in my 1st backport try changes related to https://issues.apache.org/jira/browse/OFBIZ-4794 slipped in inadvertently, this removes them
Modified: ofbiz/branches/release12.04/build.xml ofbiz/branches/release12.04/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java ofbiz/branches/release12.04/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java ofbiz/branches/release12.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java ofbiz/branches/release12.04/framework/common/servicedef/services_test.xml ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/engine/AbstractEngine.java ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java Modified: ofbiz/branches/release12.04/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/build.xml?rev=1511615&r1=1511614&r2=1511615&view=diff ============================================================================== --- ofbiz/branches/release12.04/build.xml (original) +++ ofbiz/branches/release12.04/build.xml Thu Aug 8 08:26:11 2013 @@ -874,7 +874,6 @@ under the License. <jvmarg value="${memory.max.param}"/> <jvmarg value="${memory.maxpermsize.param}"/> <arg value="test"/> - <arg value="-portoffset=${portoffset}"/> <env key="LC_ALL" value="C"/> </java> <mkdir dir="runtime/logs/test-results/html"/> Modified: ofbiz/branches/release12.04/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java?rev=1511615&r1=1511614&r2=1511615&view=diff ============================================================================== --- ofbiz/branches/release12.04/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java (original) +++ ofbiz/branches/release12.04/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java Thu Aug 8 08:26:11 2013 @@ -18,11 +18,11 @@ *******************************************************************************/ package org.ofbiz.base.container; -import java.net.URL; - -import org.ofbiz.base.start.Classpath; import org.ofbiz.base.util.CachedClassLoader; import org.ofbiz.base.util.Debug; +import org.ofbiz.base.start.Classpath; + +import java.net.URL; /** * ClassLoader Container; Created a CachedClassLoader for use by all following containers @@ -32,7 +32,6 @@ public class ClassLoaderContainer implem public static final String module = ClassLoaderContainer.class.getName(); protected static CachedClassLoader cl = null; - public static Integer portOffset = null; /** * @see org.ofbiz.base.container.Container#init(java.lang.String[], java.lang.String) @@ -47,34 +46,6 @@ public class ClassLoaderContainer implem } cl = new CachedClassLoader(new URL[0], parent); - - if (args != null) { - for (String argument : args) { - // arguments can prefix w/ a '-'. Just strip them off - if (argument.startsWith("-")) { - int subIdx = 1; - if (argument.startsWith("--")) { - subIdx = 2; - } - argument = argument.substring(subIdx); - } - - // parse the arguments - if (argument.indexOf("=") != -1) { - String argumentName = argument.substring(0, argument.indexOf("=")); - String argumentVal = argument.substring(argument.indexOf("=") + 1); - - if ("portoffset".equalsIgnoreCase(argumentName)) { - try { - ClassLoaderContainer.portOffset = Integer.valueOf(argumentVal); - } catch (NumberFormatException e) { - e.printStackTrace(); - } - } - } - } - } - Thread.currentThread().setContextClassLoader(cl); Debug.logInfo("CachedClassLoader created", module); } Modified: ofbiz/branches/release12.04/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java?rev=1511615&r1=1511614&r2=1511615&view=diff ============================================================================== --- ofbiz/branches/release12.04/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java (original) +++ ofbiz/branches/release12.04/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java Thu Aug 8 08:26:11 2013 @@ -54,9 +54,6 @@ public class NamingServiceContainer impl if (port.value != null) { try { this.namingPort = Integer.parseInt(port.value); - if (ClassLoaderContainer.portOffset != null) { - this.namingPort += ClassLoaderContainer.portOffset; - } } catch (Exception e) { throw new ContainerException("Invalid port defined in container [naming-container] configuration; not a valid int"); } Modified: ofbiz/branches/release12.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=1511615&r1=1511614&r2=1511615&view=diff ============================================================================== --- ofbiz/branches/release12.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java (original) +++ ofbiz/branches/release12.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Thu Aug 8 08:26:11 2013 @@ -235,13 +235,6 @@ public class CatalinaContainer implement public boolean start() throws ContainerException { // Start the Tomcat server try { - if (ClassLoaderContainer.portOffset != null) { - for (Connector con: tomcat.getService().findConnectors()) { - int port = con.getPort(); - port += ClassLoaderContainer.portOffset; - con.setPort(port); - } - } tomcat.getServer().start(); } catch (LifecycleException e) { throw new ContainerException(e); @@ -251,9 +244,6 @@ public class CatalinaContainer implement loadComponents(); for (Connector con: tomcat.getService().findConnectors()) { - int port = con.getPort(); - port += ClassLoaderContainer.portOffset; - con.setPort(port); ProtocolHandler ph = con.getProtocolHandler(); if (ph instanceof Http11Protocol) { Http11Protocol hph = (Http11Protocol) ph; @@ -493,10 +483,6 @@ public class CatalinaContainer implement String protocol = ContainerConfig.getPropertyValue(connectorProp, "protocol", "HTTP/1.1"); String address = ContainerConfig.getPropertyValue(connectorProp, "address", "0.0.0.0"); int port = ContainerConfig.getPropertyValue(connectorProp, "port", 0); - if (ClassLoaderContainer.portOffset != null) { - port += ClassLoaderContainer.portOffset; - } - boolean secure = ContainerConfig.getPropertyValue(connectorProp, "secure", false); if (protocol.toLowerCase().startsWith("ajp")) { protocol = "ajp"; Modified: ofbiz/branches/release12.04/framework/common/servicedef/services_test.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/common/servicedef/services_test.xml?rev=1511615&r1=1511614&r2=1511615&view=diff ============================================================================== --- ofbiz/branches/release12.04/framework/common/servicedef/services_test.xml (original) +++ ofbiz/branches/release12.04/framework/common/servicedef/services_test.xml Thu Aug 8 08:26:11 2013 @@ -82,23 +82,28 @@ under the License. <service name="groupTest" engine="group" location="testGroup" invoke=""/> - <service name="testHttp" engine="http" location="main-http" invoke="testScv"> + <service name="testHttp" engine="http" + location="http://localhost:8080/webtools/control/httpService" invoke="testScv"> <description>HTTP service wrapper around the test service</description> <attribute name="message" type="String" mode="IN" optional="true"/> <attribute name="resp" type="String" mode="OUT"/> </service> - <service name="testSoap" engine="soap" export="true" location="main-local-soap" invoke="testSOAPScv"> + <service name="testSoap" engine="soap" export="true" + location="http://localhost:8080/webtools/control/SOAPService" invoke="testSOAPScv"> <description>SOAP service; calls the OFBiz test SOAP service</description> <implements service="testSOAPScv"/> </service> - <service name="testSoapSimple" engine="soap" export="true" location="main-local-soap" invoke="testScv"> + <service name="testSoapSimple" engine="soap" export="true" + location="http://localhost:8080/webtools/control/SOAPService" invoke="testScv"> <description>simple SOAP service; calls the OFBiz test service</description> <implements service="testScv"/> </service> - <service name="testRemoteSoap" engine="soap" export="true" location="main-remote-soap" invoke="testSoapSimple"> + <service name="testRemoteSoap" engine="soap" export="true" + location="http://demo-trunk.ofbiz.apache.org:8080/webtools/control/SOAPService" + invoke="testSoapSimple"> <attribute name="defaultValue" type="Double" mode="IN" default-value="999.9999"/> <attribute name="message" type="String" mode="IN" optional="true"/> <attribute name="resp" type="String" mode="OUT"/> Modified: ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/engine/AbstractEngine.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/engine/AbstractEngine.java?rev=1511615&r1=1511614&r2=1511615&view=diff ============================================================================== --- ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/engine/AbstractEngine.java (original) +++ ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/engine/AbstractEngine.java Thu Aug 8 08:26:11 2013 @@ -18,21 +18,21 @@ *******************************************************************************/ package org.ofbiz.service.engine; -import java.util.Iterator; -import java.util.List; import java.util.Map; +import java.util.List; +import java.util.Iterator; import javolution.util.FastMap; +import org.ofbiz.service.ServiceDispatcher; +import org.ofbiz.service.ModelService; +import org.ofbiz.service.GenericServiceException; +import org.ofbiz.service.GenericServiceCallback; +import org.ofbiz.service.config.ServiceConfigUtil; import org.ofbiz.base.config.GenericConfigException; -import org.ofbiz.base.container.ClassLoaderContainer; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilXml; -import org.ofbiz.service.GenericServiceCallback; -import org.ofbiz.service.GenericServiceException; -import org.ofbiz.service.ModelService; -import org.ofbiz.service.ServiceDispatcher; -import org.ofbiz.service.config.ServiceConfigUtil; + import org.w3c.dom.Element; /** @@ -66,12 +66,7 @@ public abstract class AbstractEngine imp List<? extends Element> locationElements = UtilXml.childElementList(root, "service-location"); if (locationElements != null) { for (Element e: locationElements) { - String location = e.getAttribute("location"); - if (location.contains("localhost") && ClassLoaderContainer.portOffset != null) { - Integer port = 8080 + ClassLoaderContainer.portOffset; - location.replace("8080", port.toString()); - } - locationMap.put(e.getAttribute("name"), location); + locationMap.put(e.getAttribute("name"), e.getAttribute("location")); } } } Modified: ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java?rev=1511615&r1=1511614&r2=1511615&view=diff ============================================================================== --- ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java (original) +++ ofbiz/branches/release12.04/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java Thu Aug 8 08:26:11 2013 @@ -26,7 +26,6 @@ import java.rmi.server.RMIServerSocketFa import javax.naming.InitialContext; import javax.naming.NamingException; -import org.ofbiz.base.container.ClassLoaderContainer; import org.ofbiz.base.container.Container; import org.ofbiz.base.container.ContainerConfig; import org.ofbiz.base.container.ContainerException; @@ -82,11 +81,6 @@ public class RmiServiceContainer impleme String useCtx = initialCtxProp == null || initialCtxProp.value == null ? "false" : initialCtxProp.value; String host = lookupHostProp == null || lookupHostProp.value == null ? "localhost" : lookupHostProp.value; String port = lookupPortProp == null || lookupPortProp.value == null ? "1099" : lookupPortProp.value; - if (ClassLoaderContainer.portOffset != null) { - Integer portValue = Integer.valueOf(port); - portValue += ClassLoaderContainer.portOffset; - port = portValue.toString(); - } String keystore = ContainerConfig.getPropertyValue(cfg, "ssl-keystore", null); String ksType = ContainerConfig.getPropertyValue(cfg, "ssl-keystore-type", "JKS"); String ksPass = ContainerConfig.getPropertyValue(cfg, "ssl-keystore-pass", null);