Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/security/config/SecurityEntityLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/security/config/SecurityEntityLabels.xml?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/security/config/SecurityEntityLabels.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/security/config/SecurityEntityLabels.xml Mon Sep 15 08:31:29 2014 @@ -285,7 +285,7 @@ <value xml:lang="ja">ãµã³ãã«ç®¡çç»é¢ã§ã®ãã¹ã¦ã®æä½ã</value> <value xml:lang="ru">ÐÑе опеÑаÑии в пÑиложении УпÑавление пÑимеÑами.</value> <value xml:lang="th">à¸à¸²à¸£à¸à¸³à¸à¸²à¸à¸à¸±à¹à¸à¸«à¸¡à¸à¹à¸à¸«à¸à¹à¸²à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸£à¸à¸±à¸§à¸à¸¢à¹à¸²à¸</value> - <value xml:lang="zh">卿 ·ä¾ç®¡çå±ä¸çå ¨é¨æä½ã</value> + <value xml:lang="zh">卿 ·ä¾ç®¡ç页é¢ä¸çå ¨é¨æä½ã</value> <value xml:lang="zh_TW">å¨ç¯ä¾ç®¡çç«é¢ä¸çå ¨é¨æä½ã</value> </property> <property key="SecurityPermission description.EXAMPLE_CREATE"> @@ -296,7 +296,7 @@ <value xml:lang="ja">ãµã³ãã«ç®¡çç»é¢ã§ã®ä½ææä½ã</value> <value xml:lang="ru">ÐпеÑаÑии ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð² пÑиложении УпÑавление пÑимеÑами.</value> <value xml:lang="th">สรà¹à¸²à¸à¸à¸²à¸£à¸à¸³à¸à¸²à¸à¹à¸à¸«à¸à¹à¸²à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸£à¸à¸±à¸§à¸à¸¢à¹à¸²à¸</value> - <value xml:lang="zh">卿 ·ä¾ç®¡çå±ä¸å建æä½ã</value> + <value xml:lang="zh">卿 ·ä¾ç®¡ç页é¢ä¸å建æä½ã</value> <value xml:lang="zh_TW">å¨ç¯ä¾ç®¡çç«é¢ä¸æ°å»ºæä½ã</value> </property> <property key="SecurityPermission description.EXAMPLE_DELETE"> @@ -307,7 +307,7 @@ <value xml:lang="ja">ãµã³ãã«ç®¡çç»é¢ã§ã®å餿ä½ã</value> <value xml:lang="ru">ÐпеÑаÑии ÑÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð² пÑиложении УпÑавление пÑимеÑами.</value> <value xml:lang="th">ลà¸à¸à¸²à¸£à¸à¸³à¸à¸²à¸à¹à¸à¸«à¸à¹à¸²à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸£à¸à¸±à¸§à¸à¸¢à¹à¸²à¸</value> - <value xml:lang="zh">卿 ·ä¾ç®¡çå±ä¸å 餿ä½ã</value> + <value xml:lang="zh">卿 ·ä¾ç®¡ç页é¢ä¸å 餿ä½ã</value> <value xml:lang="zh_TW">å¨ç¯ä¾ç®¡çç«é¢ä¸åªé¤æä½ã</value> </property> <property key="SecurityPermission description.EXAMPLE_UPDATE"> @@ -318,7 +318,7 @@ <value xml:lang="ja">ãµã³ãã«ç®¡çç»é¢ã§ã®æ´æ°æä½ã</value> <value xml:lang="ru">ÐпеÑаÑии Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð² пÑиложении УпÑавление пÑимеÑами.</value> <value xml:lang="th">à¸à¸±à¸à¹à¸à¸à¸à¸²à¸£à¸à¸³à¸à¸²à¸à¹à¸à¸«à¸à¹à¸²à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸£à¸à¸±à¸§à¸à¸¢à¹à¸²à¸</value> - <value xml:lang="zh">卿 ·ä¾ç®¡çå±ä¸æ´æ°æä½ã</value> + <value xml:lang="zh">卿 ·ä¾ç®¡ç页é¢ä¸æ´æ°æä½ã</value> <value xml:lang="zh_TW">å¨ç¯ä¾ç®¡çç«é¢ä¸æ´æ°æä½ã</value> </property> <property key="SecurityPermission description.EXAMPLE_VIEW"> @@ -329,7 +329,7 @@ <value xml:lang="ja">ãµã³ãã«ç®¡çç»é¢ã§ã®è¡¨ç¤ºæä½ã</value> <value xml:lang="ru">ÐпеÑаÑии пÑоÑмоÑÑа в пÑиложении УпÑавление пÑимеÑами.</value> <value xml:lang="th">à¹à¸ªà¸à¸à¸à¸²à¸£à¸à¸³à¸à¸²à¸à¹à¸à¸«à¸à¹à¸²à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸£à¸à¸±à¸§à¸à¸¢à¹à¸²à¸</value> - <value xml:lang="zh">卿 ·ä¾ç®¡çå±ä¸æµè§æä½ã</value> + <value xml:lang="zh">卿 ·ä¾ç®¡ç页é¢ä¸æµè§æä½ã</value> <value xml:lang="zh_TW">å¨ç¯ä¾ç®¡çç«é¢ä¸ç覽æä½ã</value> </property> <property key="SecurityPermission.description.ACCOUNTING_ADMIN"> @@ -1186,21 +1186,21 @@ <value xml:lang="en">Use the customer screens in myportal.</value> <value xml:lang="it">Usare la visualizzazione clienti in myportal.</value> <value xml:lang="ja">ç§ã®ãã¼ã¿ã«ã§é¡§å®¢ç»é¢ã®ä½¿ç¨ã</value> - <value xml:lang="zh">æç鍿·ä¸ä½¿ç¨å®¢æ·å±å¹ã</value> + <value xml:lang="zh">æç鍿·ä¸ä½¿ç¨å®¢æ·é¡µé¢ã</value> <value xml:lang="zh_TW">æçå ¥å£ç¶²ç«ä¸å®¢æ¶ä½¿ç¨è ç«é¢ã</value> </property> <property key="SecurityPermission.description.MYPORTAL_EMPL-NOEML"> <value xml:lang="en">Usage of the employee screens in myportal: projectmanager and internal notes.</value> <value xml:lang="it">Usare la visualizzazione clienti in myportal: gestione progetti e note interne.</value> <value xml:lang="ja">ç§ã®ãã¼ã¿ã«ã§å¾æ¥å¡ç»é¢ã®ä½¿ç¨ãããã¸ã§ã¯ã管çããã³å é¨é£çµ¡ã</value> - <value xml:lang="zh">æç鍿·ä¸ä½¿ç¨éåå±å¹ï¼é¡¹ç®ç®¡çåå é¨ä¾¿ç¬ºã</value> + <value xml:lang="zh">æç鍿·ä¸ä½¿ç¨éå页é¢ï¼é¡¹ç®ç®¡çåå é¨ä¾¿ç¬ºã</value> <value xml:lang="zh_TW">æçå ¥å£ç¶²ç«ä¸å¡å·¥ä½¿ç¨è ç«é¢ï¼å°æ¡ç®¡çåå §é¨ä¾¿ç®ã</value> </property> <property key="SecurityPermission.description.MYPORTAL_EMPLOYEE"> <value xml:lang="en">Use the employee screens in myportal.</value> <value xml:lang="it">Usare la visualizzazione impiegati in myportal.</value> <value xml:lang="ja">ç§ã®ãã¼ã¿ã«ã§å¾æ¥å¡ç»é¢ã®ä½¿ç¨ã</value> - <value xml:lang="zh">æç鍿·ä¸ä½¿ç¨éåå±å¹ã</value> + <value xml:lang="zh">æç鍿·ä¸ä½¿ç¨éå页é¢ã</value> <value xml:lang="zh_TW">ææçå ¥å£ç¶²ç«ä¸å¡å·¥ä½¿ç¨è ç«é¢ã</value> </property> <property key="SecurityPermission.description.OAGIS_VIEW"> @@ -1939,7 +1939,7 @@ <value xml:lang="ja">ã»ãã¥ãªãã£ç®¡çç»é¢ã§ã®ãã¹ã¦ã®æä½ã</value> <value xml:lang="ru">ÐÑе опеÑаÑии в пÑиложении УпÑавление безопаÑноÑÑÑÑ.</value> <value xml:lang="th">à¸à¸²à¸£à¸à¸³à¸à¸²à¸à¸à¸±à¹à¸à¸«à¸¡à¸à¹à¸à¸«à¸à¹à¸²à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸£à¸à¸§à¸²à¸¡à¸à¸¥à¸à¸à¸ ัย</value> - <value xml:lang="zh">å¨å®å ¨ç®¡çå±å¹ä¸çå ¨é¨æä½ã</value> + <value xml:lang="zh">å¨å®å ¨ç®¡ç页é¢ä¸çå ¨é¨æä½ã</value> <value xml:lang="zh_TW">å¨å®å ¨ç®¡çç«é¢ä¸çå ¨é¨æä½ã</value> </property> <property key="SecurityPermission.description.SECURITY_CREATE"> @@ -1950,7 +1950,7 @@ <value xml:lang="ja">ã»ãã¥ãªãã£ç®¡çç»é¢ã§ã®ä½ææä½ã</value> <value xml:lang="ru">ÐпеÑаÑии ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð² пÑиложении УпÑавление безопаÑноÑÑÑÑ.</value> <value xml:lang="th">สรà¹à¸²à¸à¸à¸²à¸£à¸à¸³à¸à¸²à¸à¹à¸à¸«à¸à¹à¸²à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸£à¸à¸§à¸²à¸¡à¸à¸¥à¸à¸à¸ ัย</value> - <value xml:lang="zh">å¨å®å ¨ç®¡çå±å¹ä¸çå建æä½ã</value> + <value xml:lang="zh">å¨å®å ¨ç®¡ç页é¢ä¸çå建æä½ã</value> <value xml:lang="zh_TW">å¨å®å ¨ç®¡çç«é¢ä¸çæ°å»ºæä½ã</value> </property> <property key="SecurityPermission.description.SECURITY_DELETE"> @@ -1961,7 +1961,7 @@ <value xml:lang="ja">ã»ãã¥ãªãã£ç®¡çç»é¢ã§ã®å餿ä½ã</value> <value xml:lang="ru">ÐпеÑаÑии ÑÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð² пÑиложении УпÑавление безопаÑноÑÑÑÑ.</value> <value xml:lang="th">ลà¸à¸à¸²à¸£à¸à¸³à¸à¸²à¸à¹à¸à¸«à¸à¹à¸²à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸£à¸à¸§à¸²à¸¡à¸à¸¥à¸à¸à¸ ัย</value> - <value xml:lang="zh">å¨å®å ¨ç®¡çå±å¹ä¸çå 餿ä½ã</value> + <value xml:lang="zh">å¨å®å ¨ç®¡ç页é¢ä¸çå 餿ä½ã</value> <value xml:lang="zh_TW">å¨å®å ¨ç®¡çç«é¢ä¸çåªé¤æä½ã</value> </property> <property key="SecurityPermission.description.SECURITY_UPDATE"> @@ -1972,7 +1972,7 @@ <value xml:lang="ja">ã»ãã¥ãªãã£ç®¡çç»é¢ã§ã®æ´æ°æä½ã</value> <value xml:lang="ru">ÐпеÑаÑии Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð² пÑиложении УпÑавление безопаÑноÑÑÑÑ.</value> <value xml:lang="th">à¸à¸±à¸à¹à¸à¸à¸à¸²à¸£à¸à¸³à¸à¸²à¸à¹à¸à¸«à¸à¹à¸²à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸£à¸à¸§à¸²à¸¡à¸à¸¥à¸à¸à¸ ัย</value> - <value xml:lang="zh">å¨å®å ¨ç®¡çå±å¹ä¸çæ´æ°æä½ã</value> + <value xml:lang="zh">å¨å®å ¨ç®¡ç页é¢ä¸çæ´æ°æä½ã</value> <value xml:lang="zh_TW">å¨å®å ¨ç®¡çç«é¢ä¸çæ´æ°æä½ã</value> </property> <property key="SecurityPermission.description.SECURITY_VIEW"> @@ -1983,7 +1983,7 @@ <value xml:lang="ja">ã»ãã¥ãªãã£ç®¡çç»é¢ã§ã®è¡¨ç¤ºæä½ã</value> <value xml:lang="ru">ÐпеÑаÑии пÑоÑмоÑÑа в пÑиложении УпÑавление безопаÑноÑÑÑÑ.</value> <value xml:lang="th">à¹à¸ªà¸à¸à¸à¸²à¸£à¸à¸³à¸à¸²à¸à¹à¸à¸«à¸à¹à¸²à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸£à¸à¸§à¸²à¸¡à¸à¸¥à¸à¸à¸ ัย</value> - <value xml:lang="zh">å¨å®å ¨ç®¡çå±å¹ä¸çæµè§æä½ã</value> + <value xml:lang="zh">å¨å®å ¨ç®¡ç页é¢ä¸çæµè§æä½ã</value> <value xml:lang="zh_TW">å¨å®å ¨ç®¡çç«é¢ä¸çç覽æä½ã</value> </property> <property key="SecurityPermission.description.SEND_CONTROL_APPLET"> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/config/model/ServiceEngine.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/config/model/ServiceEngine.java?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/config/model/ServiceEngine.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/config/model/ServiceEngine.java Mon Sep 15 08:31:29 2014 @@ -24,8 +24,8 @@ 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.start.Start; import org.ofbiz.base.util.UtilXml; import org.ofbiz.service.config.ServiceConfigException; import org.w3c.dom.Element; @@ -87,17 +87,14 @@ public final class ServiceEngine { } else { List<ServiceLocation> serviceLocations = new ArrayList<ServiceLocation>(serviceLocationElementList.size()); 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); - } + String location = serviceLocationElement.getAttribute("location").intern(); + if (location.contains("localhost") && Start.getInstance().getConfig().portOffset != 0) { + String s = location.substring(location.lastIndexOf(":") + 1); + Integer locationPort = Integer.valueOf(s.substring(0, s.indexOf("/"))); + Integer port = locationPort + Start.getInstance().getConfig().portOffset; + location = location.replace(locationPort.toString(), port.toString()); + } + serviceLocations.add(new ServiceLocation(serviceLocationElement, location)); } this.serviceLocations = Collections.unmodifiableList(serviceLocations); } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/config/model/ServiceLocation.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/config/model/ServiceLocation.java?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/config/model/ServiceLocation.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/config/model/ServiceLocation.java Mon Sep 15 08:31:29 2014 @@ -28,16 +28,15 @@ 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 { + ServiceLocation(Element serviceLocationElement, String location) throws ServiceConfigException { String name = serviceLocationElement.getAttribute("name").intern(); if (name.isEmpty()) { throw new ServiceConfigException("<service-location> element name attribute is empty"); } this.name = name; - String location = serviceLocationElement.getAttribute("location").intern(); if (location.isEmpty()) { throw new ServiceConfigException("<service-location> element location attribute is empty"); } @@ -48,10 +47,6 @@ public final class ServiceLocation { return location; } - public void setLocation(String location) { - this.location = location; - } - public String getName() { return name; } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/engine/XMLRPCClientEngine.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/engine/XMLRPCClientEngine.java?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/engine/XMLRPCClientEngine.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/engine/XMLRPCClientEngine.java Mon Sep 15 08:31:29 2014 @@ -28,7 +28,7 @@ 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.start.Start; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; @@ -91,9 +91,11 @@ 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()); + if (Start.getInstance().getConfig().portOffset != 0) { + String s = url.substring(url.lastIndexOf(":") + 1); + Integer rpcPort = Integer.valueOf(s.substring(0, s.indexOf("/"))); + Integer port = rpcPort + Start.getInstance().getConfig().portOffset; + url = url.replace(rpcPort.toString(), port.toString()); } login = ServiceConfigUtil.getEngineParameter(engine, "login"); password = ServiceConfigUtil.getEngineParameter(engine, "password"); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java Mon Sep 15 08:31:29 2014 @@ -26,10 +26,10 @@ 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; +import org.ofbiz.base.start.Start; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.DelegatorFactory; @@ -81,9 +81,9 @@ 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) { + if (Start.getInstance().getConfig().portOffset != 0) { Integer portValue = Integer.valueOf(port); - portValue += ClassLoaderContainer.portOffset; + portValue += Start.getInstance().getConfig().portOffset; port = portValue.toString(); } String keystore = ContainerConfig.getPropertyValue(cfg, "ssl-keystore", null); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/test/XmlRpcTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/test/XmlRpcTests.java?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/test/XmlRpcTests.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/test/XmlRpcTests.java Mon Sep 15 08:31:29 2014 @@ -23,7 +23,7 @@ import java.util.Locale; import java.util.Map; import org.apache.xmlrpc.client.XmlRpcClient; -import org.ofbiz.base.container.ClassLoaderContainer; +import org.ofbiz.base.start.Start; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; @@ -42,8 +42,8 @@ public class XmlRpcTests extends Abstrac public XmlRpcTests(String name) { super(name); - if (ClassLoaderContainer.portOffset != 0) { - Integer port = 8080 + ClassLoaderContainer.portOffset; + if (Start.getInstance().getConfig().portOffset != 0) { + Integer port = 8080 + Start.getInstance().getConfig().portOffset; url = url.replace("8080", port.toString()); } } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java Mon Sep 15 08:31:29 2014 @@ -43,19 +43,16 @@ public class Config { public final String baseDtd; public final String baseJar; public final String baseLib; - public final String commJar; public final String containerConfig; public final String instrumenterClassName; public final String instrumenterFile; public final List<Map<String, String>> loaders; public final String logDir; public final String ofbizHome; - public final boolean requireCommJar; - public final boolean requireToolsJar; public final boolean shutdownAfterLoad; public final String splashLogo; - public final String toolsJar; public final boolean useShutdownHook; + public final Integer portOffset; Config(String[] args) throws IOException { String firstArg = args.length > 0 ? args[0] : ""; @@ -73,10 +70,6 @@ public class Config { } String config = "org/ofbiz/base/start/" + firstArg + ".properties"; - // check the java_version - String javaVersion = System.getProperty("java.version"); - String javaVendor = System.getProperty("java.vendor"); - Properties props = this.getPropertiesFile(config); System.out.println("Start.java using configuration file " + config); @@ -103,16 +96,6 @@ public class Config { // base jar file baseJar = getOfbizHomeProp(props, "ofbiz.base.jar", "framework/base/build/lib/ofbiz-base.jar"); - // tools jar - String reqTJ = getProp(props, "java.tools.jar.required", "false"); - requireToolsJar = "true".equalsIgnoreCase(reqTJ); - toolsJar = this.findSystemJar(props, javaVendor, javaVersion, "tools.jar", requireToolsJar); - - // comm jar - String reqCJ = getProp(props, "java.comm.jar.required", "false"); - requireCommJar = "true".equalsIgnoreCase(reqCJ); - commJar = this.findSystemJar(props, javaVendor, javaVersion, "comm.jar", requireCommJar); - // log directory logDir = getOfbizHomeProp(props, "ofbiz.log.dir", "runtime/logs"); @@ -221,97 +204,35 @@ public class Config { } } loaders = Collections.unmodifiableList(loadersTmp); - } - - private String findSystemJar(Properties props, String javaVendor, String javaVersion, String jarName, boolean required) { - String fileSep = System.getProperty("file.separator"); - String javaHome = System.getProperty("java.home"); - String errorMsg = "Unable to locate " + jarName + " - "; - String jarLoc = "lib" + fileSep + jarName; - File tj = null; - - if ("tools.jar".equals(jarName) && javaVendor.startsWith("Apple")) { - // tools.jar is always available in Apple's JDK implementation - return null; - } - - // check to see if it is in the OFBIZ_HOME directory - tj = new File(ofbizHome + fileSep + jarName); - if (tj.exists()) { - return null; - } - - // check to see if it is in the base/lib directory - tj = new File(baseLib + fileSep + jarName); - if (tj.exists()) { - return null; - } - - // try to locate tools.jar from the properties file - String jarProps = props.getProperty("java." + jarName, null); - if (jarProps != null) { - tj = new File(jarProps); - if (!tj.exists()) { - if (required) { - System.err.println(errorMsg + tj.getAbsolutePath()); - } - } else { - // System.out.println(foundMsg + tj.getAbsolutePath()); - return jarProps; - } - } - - // next check the JAVA_HOME lib dir - tj = new File(javaHome + fileSep + jarLoc); - if (!tj.exists()) { - if (required) { - System.err.println(errorMsg + tj.getAbsolutePath()); - } - } else { - // System.out.println(foundMsg + tj.getAbsolutePath()); - return tj.getAbsolutePath(); - } - // next if we are a JRE dir check the parent dir - String jreExt = fileSep + "jre"; - if (javaHome.toLowerCase().endsWith(jreExt)) { - javaHome = javaHome.substring(0, javaHome.lastIndexOf(fileSep)); - tj = new File(javaHome + fileSep + jarLoc); - if (!tj.exists()) { - if (required) { - System.err.println(errorMsg + tj.getAbsolutePath()); + // set the port offset + Integer portOffset = 0; + 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); } - } else { - // System.out.println(foundMsg + tj.getAbsolutePath()); - return tj.getAbsolutePath(); - } - } - - // special windows checking - if (javaHome.toLowerCase().charAt(1) == ':') { - String driveLetter = javaHome.substring(0, 2); - String windowsPath = driveLetter + fileSep + "j2sdk" + javaVersion; - tj = new File(windowsPath + fileSep + jarLoc); - if (!tj.exists()) { - if (required) { - System.err.println(errorMsg + tj.getAbsolutePath()); + // 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) && !"${portoffset}".equals(argumentVal)) { + try { + portOffset = Integer.valueOf(argumentVal); + } catch (NumberFormatException e) { + System.out.println("Error while parsing portoffset (the default value 0 will be used) = " + e); + } + } } - } else { - // System.out.println(foundMsg + tj.getAbsolutePath()); - return tj.getAbsolutePath(); } } + this.portOffset = portOffset; - if (required) { - System.err.println(""); - System.err.println("Required library " + jarName + " could not be located."); - System.err.println("You may need to copy " + jarName + " into a loadable lib directory"); - System.err.println("(i.e. OFBIZ_HOME or OFBIZ_HOME/base/lib)"); - System.err.println(""); - System.exit(-1); - } - - return null; } private String getOfbizHomeProp(Properties props, String key, String def) { @@ -370,25 +291,19 @@ public class Config { return props; } - public void initClasspath(Classpath classPath) throws IOException { - // load tools.jar - if (this.toolsJar != null) { - classPath.addComponent(this.toolsJar); - } - // load comm.jar - if (this.commJar != null) { - classPath.addComponent(this.commJar); - } - // add OFBIZ_HOME to class path & load libs + void initClasspath(Classpath classPath) throws IOException { + // add OFBIZ_HOME to class path classPath.addClasspath(this.ofbizHome); - loadLibs(classPath, this.ofbizHome, false); - // load the lib directory + + // load all the resources from the framework base component + // load all the jars from the base lib directory if (this.baseLib != null) { loadLibs(classPath, this.baseLib, true); } - // load the ofbiz-base.jar + // load the ofbiz-base.jar and the ofbiz-base-test.jar if (this.baseJar != null) { classPath.addComponent(this.baseJar); + classPath.addComponent(this.baseJar.substring(0, this.baseJar.indexOf(".jar")) + "-test.jar"); } // load the base schema directory if (this.baseDtd != null) { Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java Mon Sep 15 08:31:29 2014 @@ -219,8 +219,6 @@ public final class Start { if (!fullInit) { return; } - // initialize the classpath - initClasspath(); // create the log directory createLogDirectory(); // create the listener thread @@ -241,25 +239,15 @@ public final class Start { initStartLoaders(); } - private void initClasspath() throws StartupException { - Classpath classPath = new Classpath(System.getProperty("java.class.path")); + private void initStartLoaders() throws StartupException { + Classpath classPath = new Classpath(); try { this.config.initClasspath(classPath); } catch (IOException e) { throw (StartupException) new StartupException("Couldn't initialized classpath").initCause(e); } - // Set the classpath/classloader - System.setProperty("java.class.path", classPath.toString()); ClassLoader classloader = classPath.getClassLoader(); Thread.currentThread().setContextClassLoader(classloader); - if (System.getProperty("DEBUG") != null) { - System.out.println("Startup Classloader: " + classloader.toString()); - System.out.println("Startup Classpath: " + classPath.toString()); - } - } - - private void initStartLoaders() throws StartupException { - ClassLoader classloader = Thread.currentThread().getContextClassLoader(); synchronized (this.loaders) { // initialize the loaders for (Map<String, String> loaderMap : config.loaders) { @@ -388,6 +376,10 @@ public final class Start { } } + public Config getConfig() { + return this.config; + } + // ----------------------------------------------- // private class AdminPortThread extends Thread { Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/both.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/both.properties?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/both.properties (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/both.properties Mon Sep 15 08:31:29 2014 @@ -17,15 +17,12 @@ # under the License. ############################################################################### #### -# OFBiz Startup Application Settings -#### - -# --- Java LIB tools.jar is not required -#java.tools.jar.required=false - -# --- External Base configuration files (relative to ofbiz.home) -#ofbiz.base.config=framework/base/config - +# OFBiz Startup Application Settings +#### + +# --- External Base configuration files (relative to ofbiz.home) +#ofbiz.base.config=framework/base/config + # --- External Base schema files (relative to ofbiz.home) #ofbiz.base.schema=framework/base/dtd Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/install.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/install.properties?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/install.properties (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/install.properties Mon Sep 15 08:31:29 2014 @@ -20,9 +20,6 @@ # OFBiz Startup Application Settings #### -# --- Java LIB tools.jar is not required -#java.tools.jar.required=false - # --- External Base configuration files (relative to ofbiz.home) #ofbiz.base.config=framework/base/config Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/jetty.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/jetty.properties?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/jetty.properties (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/jetty.properties Mon Sep 15 08:31:29 2014 @@ -20,10 +20,6 @@ # OFBiz Startup Application Settings #### -# --- By default we will locate the file using the java.home set by java (executable) -#java.tools.jar= -java.tools.jar.required=true - # --- By default we will use the current directory #ofbiz.home= Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/pos.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/pos.properties?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/pos.properties (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/pos.properties Mon Sep 15 08:31:29 2014 @@ -20,9 +20,6 @@ # OFBiz Startup Application Settings #### -# --- Java LIB tools.jar is not required -#java.tools.jar.required=false - # --- External Base configuration files (relative to ofbiz.home) #ofbiz.base.config=framework/base/config Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/rmi.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/rmi.properties?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/rmi.properties (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/rmi.properties Mon Sep 15 08:31:29 2014 @@ -20,9 +20,6 @@ # OFBiz Startup Application Settings #### -# --- By default we will locate the file using the java.home set by java (executable) -#java.tools.jar.required=false - # --- External Base configuration files (relative to ofbiz.home) #ofbiz.base.config=framework/base/config Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/setup.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/setup.properties?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/setup.properties (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/setup.properties Mon Sep 15 08:31:29 2014 @@ -20,9 +20,6 @@ # OFBiz Startup Application Settings #### -# --- Java LIB tools.jar is not required -#java.tools.jar.required=false - # --- External Base configuration files (relative to ofbiz.home) #ofbiz.base.config=framework/base/config Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/start.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/start.properties?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/start.properties (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/start.properties Mon Sep 15 08:31:29 2014 @@ -20,10 +20,6 @@ # OFBiz Startup Application Settings #### -# --- By default we will locate the file using the java.home set by java (executable) -#java.tools.jar= -#java.tools.jar.required=false - # --- By default we will use the current directory #ofbiz.home= Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/test.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/test.properties?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/test.properties (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/test.properties Mon Sep 15 08:31:29 2014 @@ -20,9 +20,6 @@ # OFBiz Startup Application Settings #### -# --- Java LIB tools.jar is not required -#java.tools.jar.required=false - # --- External Base configuration files (relative to ofbiz.home) #ofbiz.base.config=framework/base/config @@ -43,7 +40,7 @@ # --- StartupLoader implementations to load (in order) ofbiz.start.loader1=org.ofbiz.base.container.ContainerLoader -ofbiz.start.loader1.loaders=test,rmi +ofbiz.start.loader1.loaders=test # -- Enable the shutdown hook #ofbiz.enable.hook=true Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/testlist.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/testlist.properties?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/testlist.properties (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/testlist.properties Mon Sep 15 08:31:29 2014 @@ -20,12 +20,8 @@ # OFBiz Startup Application Settings #### -# --- Java LIB tools.jar is not required -#java.tools.jar.required=false - # --- External Base configuration files (relative to ofbiz.home) #ofbiz.base.config=framework/base/config - # --- External Base schema files (relative to ofbiz.home) #ofbiz.base.schema=framework/base/dtd Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java Mon Sep 15 08:31:29 2014 @@ -35,14 +35,12 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.ofbiz.base.util.CachedClassLoader; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilObject; -import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.DelegatorFactory; @@ -65,7 +63,6 @@ public class ContextFilter implements Fi public static final String module = ContextFilter.class.getName(); public static final String FORWARDED_FROM_SERVLET = "_FORWARDED_FROM_SERVLET_"; - protected ClassLoader localCachedClassLoader = null; protected FilterConfig config = null; protected boolean debug = false; @@ -78,10 +75,6 @@ public class ContextFilter implements Fi // puts all init-parameters in ServletContext attributes for easier parameterization without code changes this.putAllInitParametersInAttributes(); - // initialize the cached class loader for this application - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - localCachedClassLoader = new CachedClassLoader(loader, (String) config.getServletContext().getAttribute("webSiteId")); - // set debug this.debug = "true".equalsIgnoreCase(config.getInitParameter("debug")); if (!debug) { @@ -111,11 +104,6 @@ public class ContextFilter implements Fi // Debug.logInfo("Running ContextFilter.doFilter", module); // ----- Servlet Object Setup ----- - // set the cached class loader for more speedy running in this thread - String disableCachedClassloader = config.getInitParameter("disableCachedClassloader"); - if (disableCachedClassloader == null || !"Y".equalsIgnoreCase(disableCachedClassloader)) { - Thread.currentThread().setContextClassLoader(localCachedClassLoader); - } // set the ServletContext in the request for future use httpRequest.setAttribute("servletContext", config.getServletContext()); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Mon Sep 15 08:31:29 2014 @@ -37,7 +37,7 @@ import javax.servlet.http.HttpSession; import javolution.util.FastMap; -import org.ofbiz.base.container.ClassLoaderContainer; +import org.ofbiz.base.start.Start; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.SSLUtil; import org.ofbiz.base.util.StringUtil; @@ -1029,12 +1029,12 @@ public class RequestHandler { String httpServer = UtilProperties.getPropertyValue("url.properties", "force.http.host"); boolean useHttps = UtilProperties.propertyValueEqualsIgnoreCase("url.properties", "port.https.enabled", "Y"); - if (ClassLoaderContainer.portOffset != 0) { + if (Start.getInstance().getConfig().portOffset != 0) { Integer httpPortValue = Integer.valueOf(httpPort); - httpPortValue += ClassLoaderContainer.portOffset; + httpPortValue += Start.getInstance().getConfig().portOffset; httpPort = httpPortValue.toString(); Integer httpsPortValue = Integer.valueOf(httpsPort); - httpsPortValue += ClassLoaderContainer.portOffset; + httpsPortValue += Start.getInstance().getConfig().portOffset; httpsPort = httpsPortValue.toString(); } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/webdav/WebDavServlet.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/webdav/WebDavServlet.java?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/webdav/WebDavServlet.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/webdav/WebDavServlet.java Mon Sep 15 08:31:29 2014 @@ -30,7 +30,6 @@ import javax.servlet.http.HttpServletReq import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import org.ofbiz.base.util.CachedClassLoader; import org.ofbiz.base.util.Debug; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.DelegatorFactory; @@ -61,8 +60,6 @@ public class WebDavServlet extends Gener public void init(ServletConfig config) throws ServletException{ try { super.init(config); - ClassLoader loader = new CachedClassLoader(Thread.currentThread().getContextClassLoader(), null); - Thread.currentThread().setContextClassLoader(loader); ServletContext context = this.getServletContext(); String delegatorName = context.getInitParameter("entityDelegatorName"); this.delegator = DelegatorFactory.getDelegator(delegatorName); @@ -70,7 +67,7 @@ public class WebDavServlet extends Gener this.dispatcher = ServiceContainer.getLocalDispatcher(dispatcherName, this.delegator); this.security = SecurityFactory.getInstance(this.delegator); String factoryClassName = context.getInitParameter("requestHandlerFactoryClass"); - this.handlerFactory = (RequestHandlerFactory) loader.loadClass(factoryClassName).newInstance(); + this.handlerFactory = (RequestHandlerFactory) Class.forName(factoryClassName).newInstance(); } catch (Exception e) { Debug.logError(e, "Error while initializing WebDAV servlet: ", module); throw new ServletException(e); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java Mon Sep 15 08:31:29 2014 @@ -20,8 +20,8 @@ package org.ofbiz.webapp.website; import javax.servlet.http.HttpServletRequest; -import org.ofbiz.base.container.ClassLoaderContainer; import org.ofbiz.base.lang.ThreadSafe; +import org.ofbiz.base.start.Start; import org.ofbiz.base.util.Assert; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilProperties; @@ -100,12 +100,12 @@ public final class WebSiteProperties { httpsHost = request.getServerName(); } - if (ClassLoaderContainer.portOffset != 0) { + if (Start.getInstance().getConfig().portOffset != 0) { Integer httpPortValue = Integer.valueOf(httpPort); - httpPortValue += ClassLoaderContainer.portOffset; + httpPortValue += Start.getInstance().getConfig().portOffset; httpPort = httpPortValue.toString(); Integer httpsPortValue = Integer.valueOf(httpsPort); - httpsPortValue += ClassLoaderContainer.portOffset; + httpsPortValue += Start.getInstance().getConfig().portOffset; httpsPort = httpsPortValue.toString(); } @@ -133,12 +133,12 @@ public final class WebSiteProperties { String httpsHost = (webSiteValue.get("httpsHost") != null) ? webSiteValue.getString("httpsHost") : defaults.getHttpsHost(); boolean enableHttps = (webSiteValue.get("enableHttps") != null) ? webSiteValue.getBoolean("enableHttps") : defaults.getEnableHttps(); - if (ClassLoaderContainer.portOffset != 0) { + if (Start.getInstance().getConfig().portOffset != 0) { Integer httpPortValue = Integer.valueOf(httpPort); - httpPortValue += ClassLoaderContainer.portOffset; + httpPortValue += Start.getInstance().getConfig().portOffset; httpPort = httpPortValue.toString(); Integer httpsPortValue = Integer.valueOf(httpsPort); - httpsPortValue += ClassLoaderContainer.portOffset; + httpsPortValue += Start.getInstance().getConfig().portOffset; httpsPort = httpsPortValue.toString(); } Propchange: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/runtime/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Mon Sep 15 08:31:29 2014 @@ -4,3 +4,4 @@ data.zip test-list-build.xml uploads gitinfo.ftl +deployedThe.ftl Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebaystore/webapp/ebaystore/store/returnPolicy.ftl Mon Sep 15 08:31:29 2014 @@ -23,7 +23,7 @@ under the License. <#assign returnPolicyDetails = eBayDetails.getReturnPolicyDetails()> </#if> <#if !returnPolicyEnabled??><#assign not = "not"></#if> -<#assign title = "Return policy is "+not!+" enabled for this category."> +<#assign title = "Return policy is "+(not!)+" enabled for this category."> <form name="APIForm" id="APIForm" method="post" action="ReturnPolicyServlet" > <table align="center" border="0"> @@ -151,4 +151,4 @@ under the License. </td> </tr> </table> -</form> \ No newline at end of file +</form> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/build.xml?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/build.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/build.xml Mon Sep 15 08:31:29 2014 @@ -52,4 +52,8 @@ under the License. <fileset dir="../../applications/content/build/lib" includes="*.jar"/> </path> + <target name="jar" depends="classes"> + <main-jar/> + <test-jar/> + </target> </project> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/src/org/ofbiz/content/test/LuceneTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/src/org/ofbiz/content/test/LuceneTests.java?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/src/org/ofbiz/content/test/LuceneTests.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/src/org/ofbiz/content/test/LuceneTests.java Mon Sep 15 08:31:29 2014 @@ -39,6 +39,7 @@ import org.apache.lucene.store.FSDirecto import org.ofbiz.base.util.UtilMisc; import org.ofbiz.content.search.SearchWorker; import org.ofbiz.entity.GenericValue; +import org.ofbiz.service.ServiceUtil; import org.ofbiz.service.testtools.OFBizTestCase; public class LuceneTests extends OFBizTestCase { @@ -58,20 +59,21 @@ public class LuceneTests extends OFBizTe protected void tearDown() throws Exception { } - public void testCreateIndex() throws Exception { + public void testSearchTermHand() throws Exception { Map<String, Object> ctx = new HashMap<String, Object>(); ctx.put("contentId", "WebStoreCONTENT"); ctx.put("userLogin", userLogin); Map<String, Object> resp = dispatcher.runSync("indexContentTree", ctx); - } - - public void testSearchTermHand() throws Exception { + assertTrue("Could not init search index", ServiceUtil.isSuccess(resp)); + try { + Thread.sleep(3000); // sleep 3 seconds to give enough time to the indexer to process the entries + } catch(Exception e) {} Directory directory = FSDirectory.open(new File(SearchWorker.getIndexPath("content"))); DirectoryReader r = null; try { r = DirectoryReader.open(directory); } catch (Exception e) { - // ignore + fail("Could not open search index: " + directory); } BooleanQuery combQuery = new BooleanQuery(); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bizznesstime/includes/footer.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bizznesstime/includes/footer.ftl?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bizznesstime/includes/footer.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bizznesstime/includes/footer.ftl Mon Sep 15 08:31:29 2014 @@ -25,8 +25,12 @@ under the License. </div> <!-- footer --> <div id="footer"> - <div class="poweredBy"><span>Powered by <a href="http://ofbiz.apache.org" class="noicon">OFBiz</a></span><span>Copyright 2001-${nowTimestamp?string("yyyy")} <a href="http://www.apache.org" class="noicon">The Apache Software Foundation - www.apache.org</a></span><span><#include "ofbizhome://runtime/svninfo.ftl" /> <#include "ofbizhome://runtime/gitinfo.ftl" /></span></div> - + <div class="poweredBy"> + <span> + ${uiLabelMap.CommonPoweredBy} <a href="http://ofbiz.apache.org" class="noicon">OFBiz</a></span><span>Copyright 2001-${nowTimestamp?string("yyyy")} <a href="http://www.apache.org" class="noicon">The Apache Software Foundation - www.apache.org</a> + <#include "ofbizhome://runtime/svninfo.ftl" /> <#include "ofbizhome://runtime/gitinfo.ftl" /> <#attempt> - ${uiLabelMap.CommonDeployedThe} <#include "ofbizhome://runtime/deployedThe.ftl" /><#recover></#attempt> + </span> + </div> </div> <!-- footer --> </body> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bluelight/includes/header.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bluelight/includes/header.ftl?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bluelight/includes/header.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bluelight/includes/header.ftl Mon Sep 15 08:31:29 2014 @@ -96,7 +96,7 @@ under the License. <#assign organizationLogoLinkURL = "${layoutSettings.organizationLogoLinkUrl!}"> <#if person?has_content> - <#assign userName = person.firstName! + " " + person.middleName! + " " + person.lastName!> + <#assign userName = (person.firstName!) + " " + (person.middleName!) + " " + person.lastName!> <#elseif partyGroup?has_content> <#assign userName = partyGroup.groupName!> <#elseif userLogin??> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/droppingcrumbs/includes/footer.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/droppingcrumbs/includes/footer.ftl?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/droppingcrumbs/includes/footer.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/droppingcrumbs/includes/footer.ftl Mon Sep 15 08:31:29 2014 @@ -26,8 +26,10 @@ under the License. <p><a href="http://jigsaw.w3.org/css-validator/"><img src="<@ofbizContentUrl>/images/vcss.gif</@ofbizContentUrl>" alt="Valid CSS!"/></a> <a href="http://validator.w3.org/check?uri=referer"><img src="<@ofbizContentUrl>/images/valid-xhtml10.png</@ofbizContentUrl>" alt="Valid XHTML 1.0!"/></a></p> <p> - ${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")} The Apache Software Foundation - <a href="http://www.apache.org" target="_blank">www.apache.org</a><br /> - ${uiLabelMap.CommonPoweredBy} <a href="http://ofbiz.apache.org" target="_blank">Apache OFBiz</a> <#include "ofbizhome://runtime/svninfo.ftl" /> <#include "ofbizhome://runtime/gitinfo.ftl" /></p> + ${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")} The Apache Software Foundation - <a href="http://www.apache.org" target="_blank">www.apache.org</a><br /> + ${uiLabelMap.CommonPoweredBy} <a href="http://ofbiz.apache.org" target="_blank">Apache OFBiz</a> <#include "ofbizhome://runtime/svninfo.ftl" /> <#include "ofbizhome://runtime/gitinfo.ftl" /> + <#attempt> - ${uiLabelMap.CommonDeployedThe} <#include "ofbizhome://runtime/deployedThe.ftl" /><#recover></#attempt> + </p> </div> <#if layoutSettings.VT_FTR_JAVASCRIPT?has_content> <#list layoutSettings.VT_FTR_JAVASCRIPT as javaScript> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/droppingcrumbs/includes/header.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/droppingcrumbs/includes/header.ftl?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/droppingcrumbs/includes/header.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/droppingcrumbs/includes/header.ftl Mon Sep 15 08:31:29 2014 @@ -96,7 +96,7 @@ under the License. <#assign organizationLogoLinkURL = "${layoutSettings.organizationLogoLinkUrl!}"> <#if person?has_content> - <#assign userName = person.firstName! + " " + person.middleName! + " " + person.lastName!> + <#assign userName = (person.firstName!) + " " + (person.middleName!) + " " + person.lastName!> <#elseif partyGroup?has_content> <#assign userName = partyGroup.groupName!> <#elseif userLogin??> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/flatgrey/includes/footer.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/flatgrey/includes/footer.ftl?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/flatgrey/includes/footer.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/flatgrey/includes/footer.ftl Mon Sep 15 08:31:29 2014 @@ -23,7 +23,9 @@ under the License. <li class="last"><a href="<@ofbizUrl>ListVisualThemes</@ofbizUrl>">${uiLabelMap.CommonVisualThemes}</a></li> </ul> <p> - ${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")} <a href="http://www.apache.org" target="_blank">The Apache Software Foundation</a>. ${uiLabelMap.CommonPoweredBy} <a href="http://ofbiz.apache.org" target="_blank">Apache OFBiz.</a> <#include "ofbizhome://runtime/svninfo.ftl" /> <#include "ofbizhome://runtime/gitinfo.ftl" /> + ${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")} <a href="http://www.apache.org" target="_blank">The Apache Software Foundation</a>. + ${uiLabelMap.CommonPoweredBy} <a href="http://ofbiz.apache.org" target="_blank">Apache OFBiz</a> <#include "ofbizhome://runtime/svninfo.ftl" /> <#include "ofbizhome://runtime/gitinfo.ftl" /> + <#attempt> - ${uiLabelMap.CommonDeployedThe} <#include "ofbizhome://runtime/deployedThe.ftl" /><#recover></#attempt> </p> </div> </div> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/tomahawk/includes/appbarClose.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/tomahawk/includes/appbarClose.ftl?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/tomahawk/includes/appbarClose.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/tomahawk/includes/appbarClose.ftl Mon Sep 15 08:31:29 2014 @@ -18,7 +18,7 @@ under the License. --> <#assign appModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName,delegator,dispatcher)> <#if person?has_content> - <#assign userName = person.firstName! + " " + person.middleName! + " " + person.lastName!> + <#assign userName = (person.firstName!) + " " + (person.middleName!) + " " + person.lastName!> <#elseif partyGroup?has_content> <#assign userName = partyGroup.groupName!> <#elseif userLogin??> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/tomahawk/includes/footer.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/tomahawk/includes/footer.ftl?rev=1624970&r1=1624969&r2=1624970&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/tomahawk/includes/footer.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/tomahawk/includes/footer.ftl Mon Sep 15 08:31:29 2014 @@ -24,6 +24,7 @@ under the License. <li> ${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")} The Apache Software Foundation - <a href="http://www.apache.org" target="_blank">www.apache.org</a><br/> ${uiLabelMap.CommonPoweredBy} <a href="http://ofbiz.apache.org" target="_blank">Apache OFBiz</a> <#include "ofbizhome://runtime/svninfo.ftl" /> <#include "ofbizhome://runtime/gitinfo.ftl" /> + <#attempt> - ${uiLabelMap.CommonDeployedThe} <#include "ofbizhome://runtime/deployedThe.ftl" /><#recover> </#attempt> </li> <li class="opposed">${nowTimestamp?datetime?string.short} - <a href="<@ofbizUrl>ListTimezones</@ofbizUrl>">${timeZone.getDisplayName(timeZone.useDaylightTime(), Static["java.util.TimeZone"].LONG, locale)}</a> |
Free forum by Nabble | Edit this page |