You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2013/09/26 18:35:06 UTC

svn commit: r1526596 - in /ofbiz/branches/release13.07: ./ framework/base/src/org/ofbiz/base/container/ framework/catalina/src/org/ofbiz/catalina/container/ framework/common/servicedef/ framework/service/config/ framework/service/src/org/ofbiz/service/...

Author: jleroux
Date: Thu Sep 26 16:35:05 2013
New Revision: 1526596

URL: http://svn.apache.org/r1526596
Log:
Reverts revisions: 1525910 + 1526534 + 1526561, OFBIZ-4794 is not yet ready

Modified:
    ofbiz/branches/release13.07/build.xml
    ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java
    ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java
    ofbiz/branches/release13.07/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
    ofbiz/branches/release13.07/framework/common/servicedef/services_test.xml
    ofbiz/branches/release13.07/framework/service/config/serviceengine.xml
    ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/config/model/ServiceEngine.java
    ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/config/model/ServiceLocation.java
    ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/engine/XMLRPCClientEngine.java
    ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java
    ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/test/XmlRpcTests.java
    ofbiz/branches/release13.07/framework/start/src/org/ofbiz/base/start/Config.java

Modified: ofbiz/branches/release13.07/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/build.xml?rev=1526596&r1=1526595&r2=1526596&view=diff
==============================================================================
--- ofbiz/branches/release13.07/build.xml (original)
+++ ofbiz/branches/release13.07/build.xml Thu Sep 26 16:35:05 2013
@@ -408,27 +408,23 @@ under the License.
     <!-- ================================================================== -->
 
     <target name="start"
-            description="Start OFBiz (use -Dportoffset=portNumber to shift all ports with the portNumber value)">
+            description="Start OFBiz">
         <java jar="ofbiz.jar" fork="true">
             <jvmarg value="${memory.initial.param}"/>
             <jvmarg value="${memory.max.param}"/>
             <jvmarg value="${memory.maxpermsize.param}"/>
-            <arg value="start"/>
-            <arg value="-portoffset=${portoffset}"/>
         </java>
     </target>
     <target name="start-batch"
-            description="Start OFBiz as a separate process. Use -Dportoffset=portNumber to shift all ports with the portNumber value.">
+            description="Start OFBiz as a separate process">
         <java jar="ofbiz.jar" fork="true" spawn="true">
             <jvmarg value="${memory.initial.param}"/>
             <jvmarg value="${memory.max.param}"/>
             <jvmarg value="${memory.maxpermsize.param}"/>
-            <arg value="start"/>
-            <arg value="-portoffset=${portoffset}"/>
         </java>
     </target>
     <target name="start-debug"
-            description="Start OFBiz in debugging mode. It uses the 8091 port by default (use -Dportoffset=portNumber shift all other ports with the portNumber value)">
+            description="Start OFBiz in debugging mode. It uses the 8091 port by default">
         <java jar="ofbiz.jar" fork="true">
             <jvmarg value="${memory.initial.param}"/>
             <jvmarg value="${memory.max.param}"/>
@@ -437,28 +433,24 @@ under the License.
             <jvmarg value="-Djava.compiler=NONE"/>
             <jvmarg value="-Xdebug"/>
             <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091"/>
-            <arg value="start"/>
-            <arg value="-portoffset=${portoffset}"/>
         </java>
     </target>
     <target name="start-pos"
-            description="Start OFBiz POS (Point of sale). Use -Dportoffset=portNumber to shift all ports with the portNumber value.">
+            description="Start OFBiz POS (Point of sale)">
         <java jar="ofbiz.jar" fork="true">
             <jvmarg value="${memory.initial.param}"/>
             <jvmarg value="${memory.max.param}"/>
             <jvmarg value="${memory.maxpermsize.param}"/>
             <arg value="pos"/>
-          <arg value="-portoffset=${portoffset}"/>
         </java>
     </target>
     <target name="start-both"
-            description="Start OFBiz in both Web and POS (Point of sale) modes. Use -Dportoffset=portNumber to shift all ports with the portNumber value.">
+            description="Start OFBiz in both Web and POS (Point of sale) modes">
         <java jar="ofbiz.jar" fork="true">
             <jvmarg value="${memory.initial.param}"/>
             <jvmarg value="${memory.max.param}"/>
             <jvmarg value="${memory.maxpermsize.param}"/>
             <arg value="both"/>
-            <arg value="-portoffset=${portoffset}"/>
         </java>
     </target>
     <target name="stop"
@@ -914,13 +906,12 @@ under the License.
     </target>
 
     <target name="run-tests"
-          description="Run OFBiz default tests; you have to manually execute 'ant load-demo' before and see results in runtime/logs/test-results/html/all-tests.html. Use -Dportoffset=portNumber to shift all ports with the portNumber value.">
+            description="Run OFBiz default tests; you have to manually execute 'ant load-demo' before and see results in runtime/logs/test-results/html/all-tests.html.">
         <java jar="ofbiz.jar" fork="true" resultproperty="test.result">
             <jvmarg value="${memory.initial.param}"/>
             <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"/>
@@ -957,7 +948,7 @@ under the License.
         </java>
     </target>
     <target name="run-test"
-      description="Run a single test, syntax eg: ant run-test -Dtest.component=service -Dtest.case=service-soap-tests. Use -Dportoffset=portNumber to shift all ports with the portNumber value (on Windows - XP at least - you then need top wrap the parameters in double-quotes).">
+            description="Run a single test, syntax eg: ant run-test -Dtest.component=service -Dtest.case=service-soap-tests">
         <fail unless="test.component">test.component is a required parameter: -Dtest.component=componentname</fail>
         <fail unless="test.case">test.case is a required parameter: -Dtest.case=testcasename</fail>
         <java jar="ofbiz.jar" fork="true" resultproperty="test.result">
@@ -967,7 +958,6 @@ under the License.
             <arg value="test"/>
             <arg value="-component=${test.component}"/>
             <arg value="-case=${test.case}"/>
-            <arg value="-portoffset=${portoffset}"/>
             <env key="LC_ALL" value="C"/>
         </java>
         <delete dir="runtime/logs/test-results/${test.component}-${test.case}"/>

Modified: ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java?rev=1526596&r1=1526595&r2=1526596&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java (original)
+++ ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java Thu Sep 26 16:35:05 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 = 0;
     private String name;
 
     @Override
@@ -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/release13.07/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java?rev=1526596&r1=1526595&r2=1526596&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java (original)
+++ ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java Thu Sep 26 16:35:05 2013
@@ -57,9 +57,9 @@ public class NamingServiceContainer impl
         ContainerConfig.Container.Property port = cfg.getProperty("port");
         if (port.value != null) {
             try {
-                this.namingPort = Integer.parseInt(port.value) + ClassLoaderContainer.portOffset;
+                this.namingPort = Integer.parseInt(port.value);
             } catch (Exception e) {
-                throw new ContainerException("Invalid port defined in container [naming-container] configuration or as portOffset; not a valid int");
+                throw new ContainerException("Invalid port defined in container [naming-container] configuration; not a valid int");
             }
         }
 

Modified: ofbiz/branches/release13.07/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=1526596&r1=1526595&r2=1526596&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java (original)
+++ ofbiz/branches/release13.07/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Thu Sep 26 16:35:05 2013
@@ -246,8 +246,6 @@ public class CatalinaContainer implement
 
         for (Connector con: tomcat.getService().findConnectors()) {
             ProtocolHandler ph = con.getProtocolHandler();
-            int port = con.getPort();
-            con.setAttribute("port", port);
             if (ph instanceof Http11Protocol) {
                 Http11Protocol hph = (Http11Protocol) ph;
                 Debug.logInfo("Connector " + hph.getName() + " @ " + hph.getPort() + " - " +
@@ -485,7 +483,7 @@ public class CatalinaContainer implement
         // need some standard properties
         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) + ClassLoaderContainer.portOffset;
+        int port = ContainerConfig.getPropertyValue(connectorProp, "port", 0);
         boolean secure = ContainerConfig.getPropertyValue(connectorProp, "secure", false);
         if (protocol.toLowerCase().startsWith("ajp")) {
             protocol = "ajp";
@@ -545,12 +543,8 @@ public class CatalinaContainer implement
 
             try {
                 for (ContainerConfig.Container.Property prop: connectorProp.properties.values()) {
-                    if ("port".equals(prop.name)) { 
-                        connector.setProperty(prop.name, "" + port);
-                    } else {
-                        connector.setProperty(prop.name, prop.value);
-                        //connector.setAttribute(prop.name, prop.value);
-                    }
+                    connector.setProperty(prop.name, prop.value);
+                    //connector.setAttribute(prop.name, prop.value);
                 }
 
                 if (connectorProp.properties.containsKey("URIEncoding")) {

Modified: ofbiz/branches/release13.07/framework/common/servicedef/services_test.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/common/servicedef/services_test.xml?rev=1526596&r1=1526595&r2=1526596&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/common/servicedef/services_test.xml (original)
+++ ofbiz/branches/release13.07/framework/common/servicedef/services_test.xml Thu Sep 26 16:35:05 2013
@@ -72,23 +72,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/release13.07/framework/service/config/serviceengine.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/service/config/serviceengine.xml?rev=1526596&r1=1526595&r2=1526596&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/service/config/serviceengine.xml (original)
+++ ofbiz/branches/release13.07/framework/service/config/serviceengine.xml Thu Sep 26 16:35:05 2013
@@ -59,8 +59,9 @@ under the License.
         <engine name="jms" class="org.ofbiz.service.jms.JmsServiceEngine"/>
         <engine name="rmi" class="org.ofbiz.service.rmi.RmiServiceEngine"/>
         <engine name="soap" class="org.ofbiz.service.engine.SOAPClientEngine"/>
-        <!-- The engine xml-rpc-local is only used by a test service and for this reason it is configured to run on port 8080.
-             In order to use this in OFBiz change the port accordingly (for demo the default value is 8080)
+        <!-- The engine xml-rpc-local is only used by a test service and for
+             this reason it is configured to run on port 8080 (see rmi-dispatcher in service/ofbiz-component.xml);
+             in order to use this in OFBiz change the port accordingly (for demo the default value is 8080)
         -->
         <engine name="xml-rpc-local" class="org.ofbiz.service.engine.XMLRPCClientEngine">
             <parameter name="url" value="http://localhost:8080/webtools/control/xmlrpc"/>
@@ -70,9 +71,7 @@ under the License.
 
         <service-location name="main-rmi" location="rmi://localhost:1099/RMIDispatcher"/>
         <service-location name="main-http" location="http://localhost:8080/webtools/control/httpService"/>
-        <service-location name="main-local-soap" location="http://localhost:8080/webtools/control/SOAPService"/>
-        <service-location name="main-remote-soap" location="http://demo-trunk.ofbiz.apache.org:8080/webtools/control/SOAPService"/>
-        
+
         <service-location name="entity-sync-rmi" location="rmi://localhost:1099/RMIDispatcher"/>
         <service-location name="entity-sync-http" location="http://localhost:8080/webtools/control/httpService"/>
 

Modified: ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/config/model/ServiceEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/config/model/ServiceEngine.java?rev=1526596&r1=1526595&r2=1526596&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/config/model/ServiceEngine.java (original)
+++ ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/config/model/ServiceEngine.java Thu Sep 26 16:35:05 2013
@@ -24,7 +24,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.ofbiz.base.container.ClassLoaderContainer;
 import org.ofbiz.base.lang.ThreadSafe;
 import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.service.config.ServiceConfigException;
@@ -89,16 +88,6 @@ public final class ServiceEngine {
             for (Element serviceLocationElement : serviceLocationElementList) {
                 serviceLocations.add(new ServiceLocation(serviceLocationElement));
             }
-            for (ServiceLocation serviceLocation : serviceLocations) {
-                String location = serviceLocation.getLocation();
-                if (location.contains("localhost") && ClassLoaderContainer.portOffset != 0) {
-                    Integer port = 1099 + ClassLoaderContainer.portOffset; 
-                    location = location.replace("1099", port.toString());
-                    port = 8080 + ClassLoaderContainer.portOffset; 
-                    location = location.replace("8080", port.toString());
-                    serviceLocation.setLocation(location);
-                }                    
-            }
             this.serviceLocations = Collections.unmodifiableList(serviceLocations);
         }
         List<? extends Element> notificationGroupElementList = UtilXml.childElementList(engineElement, "notification-group");

Modified: ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/config/model/ServiceLocation.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/config/model/ServiceLocation.java?rev=1526596&r1=1526595&r2=1526596&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/config/model/ServiceLocation.java (original)
+++ ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/config/model/ServiceLocation.java Thu Sep 26 16:35:05 2013
@@ -28,7 +28,7 @@ import org.w3c.dom.Element;
 @ThreadSafe
 public final class ServiceLocation {
 
-    private String location;
+    private final String location;
     private final String name;
 
     ServiceLocation(Element serviceLocationElement) throws ServiceConfigException {
@@ -48,10 +48,6 @@ public final class ServiceLocation {
         return location;
     }
 
-    public void setLocation(String location) {
-        this.location = location;
-    }
-
     public String getName() {
         return name;
     }

Modified: ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/engine/XMLRPCClientEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/engine/XMLRPCClientEngine.java?rev=1526596&r1=1526595&r2=1526596&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/engine/XMLRPCClientEngine.java (original)
+++ ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/engine/XMLRPCClientEngine.java Thu Sep 26 16:35:05 2013
@@ -28,7 +28,6 @@ import javolution.util.FastMap;
 import org.apache.xmlrpc.XmlRpcException;
 import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
 import org.ofbiz.base.config.GenericConfigException;
-import org.ofbiz.base.container.ClassLoaderContainer;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilMisc;
@@ -91,10 +90,6 @@ public class XMLRPCClientEngine extends 
         String keyAlias  = null;
         try {
             url = ServiceConfigUtil.getEngineParameter(engine, "url");
-            if (ClassLoaderContainer.portOffset != 0) {
-                Integer port = 8080 + ClassLoaderContainer.portOffset; 
-                url = url.replace("8080", port.toString());
-            }
             login = ServiceConfigUtil.getEngineParameter(engine, "login");
             password = ServiceConfigUtil.getEngineParameter(engine, "password");
             keyStoreComponent = ServiceConfigUtil.getEngineParameter(engine, "keyStoreComponent");

Modified: ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java?rev=1526596&r1=1526595&r2=1526596&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java (original)
+++ ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java Thu Sep 26 16:35:05 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;
@@ -81,11 +80,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 != 0) {
-            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);

Modified: ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/test/XmlRpcTests.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/test/XmlRpcTests.java?rev=1526596&r1=1526595&r2=1526596&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/test/XmlRpcTests.java (original)
+++ ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/test/XmlRpcTests.java Thu Sep 26 16:35:05 2013
@@ -23,7 +23,6 @@ import java.util.Locale;
 import java.util.Map;
 
 import org.apache.xmlrpc.client.XmlRpcClient;
-import org.ofbiz.base.container.ClassLoaderContainer;
 import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
@@ -38,14 +37,10 @@ public class XmlRpcTests extends Abstrac
 
     public static final String module = XmlRpcTests.class.getName();
     public static final String resource = "ServiceErrorUiLabels";
-    public static String url = "http://localhost:8080/webtools/control/xmlrpc";
+    public static final String url = "http://localhost:8080/webtools/control/xmlrpc";
 
     public XmlRpcTests(String name) {
         super(name);
-        if (ClassLoaderContainer.portOffset != 0) {
-            Integer port = 8080 + ClassLoaderContainer.portOffset; 
-            url = url.replace("8080", port.toString());
-        }                            
     }
 
     /**

Modified: ofbiz/branches/release13.07/framework/start/src/org/ofbiz/base/start/Config.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/start/src/org/ofbiz/base/start/Config.java?rev=1526596&r1=1526595&r2=1526596&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/start/src/org/ofbiz/base/start/Config.java (original)
+++ ofbiz/branches/release13.07/framework/start/src/org/ofbiz/base/start/Config.java Thu Sep 26 16:35:05 2013
@@ -57,7 +57,7 @@ public class Config {
         String firstArg = args.length > 0 ? args[0] : "";
         String configFileName = getConfigFileName(firstArg);
         Config result = new Config();
-        result.readConfig(configFileName, args);
+        result.readConfig(configFileName);
         return result;
     }
 
@@ -283,7 +283,7 @@ public class Config {
         }
     }
 
-    public void readConfig(String config, String[] args) throws IOException {
+    public void readConfig(String config) throws IOException {
         // check the java_version
         String javaVersion = System.getProperty("java.version");
         String javaVendor = System.getProperty("java.vendor");
@@ -352,14 +352,6 @@ public class Config {
         // parse the port number
         try {
             adminPort = Integer.parseInt(adminPortStr);
-            if (args.length > 0) {
-                for (String arg : args) {
-                    if (arg.toLowerCase().contains("portoffset=")) {
-                        adminPort = adminPort != 0 ? adminPort : 10523; // This is necessary because the ASF Buildbot machine/s doe/s not allow ports 1 to 3, see  INFRA-6790
-                        adminPort += Integer.parseInt(arg.split("=")[1]);
-                    }
-                }
-            }
         } catch (Exception e) {
             adminPort = 0;
         }
@@ -404,16 +396,16 @@ public class Config {
         // set the default locale
         String localeString = props.getProperty("ofbiz.locale.default");
         if (localeString != null && localeString.length() > 0) {
-            String locales[] = localeString.split("_");
-            switch (locales.length) {
+            String args[] = localeString.split("_");
+            switch (args.length) {
                 case 1:
-                    Locale.setDefault(new Locale(locales[0]));
+                    Locale.setDefault(new Locale(args[0]));
                     break;
                 case 2:
-                    Locale.setDefault(new Locale(locales[0], locales[1]));
+                    Locale.setDefault(new Locale(args[0], args[1]));
                     break;
                 case 3:
-                    Locale.setDefault(new Locale(locales[0], locales[1], args[2]));
+                    Locale.setDefault(new Locale(args[0], args[1], args[2]));
             }
             System.setProperty("user.language", localeString);
         }