Modified: ofbiz/branches/jackrabbit20100709/framework/resources/templates/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/resources/templates/build.xml?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/framework/resources/templates/build.xml (original) +++ ofbiz/branches/jackrabbit20100709/framework/resources/templates/build.xml Fri Apr 8 08:07:00 2011 @@ -37,7 +37,11 @@ <!-- Targets to create patch files --> <!-- ================================================================= --> - <target name="create-ofbiz-patches" description="Creates patch for framework, application, specialpurpose components"> + <target name="create-ofbiz-patches" description="Creates patches for root, framework, application and specialpurpose components"> + <exec executable="svn" output="patches/root.patch" dir="${ofbiz.home.dir}"> + <arg value="diff"/> + <arg value="--depth=files"/> + </exec> <exec executable="svn" output="patches/root.patch" dir="${ofbiz.home.dir}"> <arg value="diff"/> <arg value="--depth=files"/> @@ -81,7 +85,7 @@ </exec> </target> - <target name="apply-ofbiz-patches" description="Apply the patch to framework, application, specialpurpose components."> + <target name="apply-ofbiz-patches" description="Apply the patches to root, framework, application and specialpurpose components."> <fail message="Patch files not found."> <condition> <or> @@ -98,6 +102,9 @@ <patch strip="0" patchfile="patches/framework.patch" dir="${ofbiz.home.dir}"/> <patch strip="0" patchfile="patches/applications.patch" dir="${ofbiz.home.dir}"/> <patch strip="0" patchfile="patches/specialpurpose.patch" dir="${ofbiz.home.dir}"/> + <delete> + <fileset dir="${ofbiz.home.dir}" includes="**/*.rej"/> + </delete> </target> <target name="reapply-ofbiz-patches" description="First removes any previously applied patch and then applies the new patch"> Propchange: ofbiz/branches/jackrabbit20100709/framework/security/data/PasswordSecurityData.xml ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Apr 8 08:07:00 2011 @@ -2,4 +2,4 @@ /ofbiz/branches/dojo1.4/applications/securityext/data/PasswordSecurityData.xml:951708-952957 /ofbiz/branches/jquery/applications/securityext/data/PasswordSecurityData.xml:952958-1044489 /ofbiz/branches/multitenant20100310/applications/securityext/data/PasswordSecurityData.xml:921280-927264 -/ofbiz/trunk/framework/security/data/PasswordSecurityData.xml:962442-1084618 +/ofbiz/trunk/framework/security/data/PasswordSecurityData.xml:962442-1090146 Modified: ofbiz/branches/jackrabbit20100709/framework/service/config/service.properties URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/service/config/service.properties?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/framework/service/config/service.properties (original) +++ ofbiz/branches/jackrabbit20100709/framework/service/config/service.properties Fri Apr 8 08:07:00 2011 @@ -21,3 +21,5 @@ servicedispatcher.servicedebugmode=true # flag to automatically export all services: same of setting export="true" for all service definitions remotedispatcher.exportall=false +# complete answer from SOAP WSDL or only brief message "Problem processing the service" for security reason +secureSoapAnswer=true Modified: ofbiz/branches/jackrabbit20100709/framework/service/src/org/ofbiz/service/ServiceDispatcher.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/service/src/org/ofbiz/service/ServiceDispatcher.java?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/framework/service/src/org/ofbiz/service/ServiceDispatcher.java (original) +++ ofbiz/branches/jackrabbit20100709/framework/service/src/org/ofbiz/service/ServiceDispatcher.java Fri Apr 8 08:07:00 2011 @@ -596,9 +596,9 @@ public class ServiceDispatcher { long timeToRun = System.currentTimeMillis() - serviceStartTime; if (Debug.timingOn() && timeToRun > 50) { - Debug.logTiming("Sync service [" + localName + "/" + modelService.name + "] finished in [" + timeToRun + "] milliseconds", module); + Debug.logTiming("Sync service [" + localName + "/" + modelService.name + "] finished in [" + timeToRun + "] milliseconds with response [" + result.toString() + "]", module); } else if (timeToRun > 200) { - Debug.logInfo("Sync service [" + localName + "/" + modelService.name + "] finished in [" + timeToRun + "] milliseconds", module); + Debug.logInfo("Sync service [" + localName + "/" + modelService.name + "] finished in [" + timeToRun + "] milliseconds with response [" + result.toString() + "]", module); } return result; Added: ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Config.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Config.java?rev=1090153&view=auto ============================================================================== --- ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Config.java (added) +++ ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Config.java Fri Apr 8 08:07:00 2011 @@ -0,0 +1,434 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + *******************************************************************************/ +package org.ofbiz.base.start; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.net.InetAddress; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.Properties; +import java.util.TimeZone; + +public class Config { + public static final double REQUIRED_JDK = 1.6; + + private static String getConfigFileName(String command) { + // default command is "start" + if (command == null || command.trim().length() == 0) { + command = "start"; + } + // strip off the leading dash + if (command.startsWith("-")) { + command = command.substring(1); + } + // shutdown & status hack + if (command.equalsIgnoreCase("shutdown")) { + command = "start"; + } else if (command.equalsIgnoreCase("status")) { + command = "start"; + } + return "org/ofbiz/base/start/" + command + ".properties"; + } + + public static Config getInstance(String[] args) throws IOException { + String firstArg = args.length > 0 ? args[0] : ""; + String configFileName = getConfigFileName(firstArg); + Config result = new Config(); + result.readConfig(configFileName); + return result; + } + + public InetAddress adminAddress; + public String adminKey; + public int adminPort; + public String awtHeadless; + public String baseConfig; + public String baseDtd; + public String baseJar; + public String baseLib; + public String commJar; + public String containerConfig; + public String instrumenterClassName; + public String instrumenterFile; + public List<String> loaders; + public String logDir; + public String ofbizHome; + public boolean requireCommJar = false; + public boolean requireToolsJar = false; + public boolean shutdownAfterLoad = false; + public String splashLogo; + public String testConfig; + public String toolsJar; + public boolean useShutdownHook = true; + + 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 foundMsg = "Found " + 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()); + } + } 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()); + } + } else { + // System.out.println(foundMsg + tj.getAbsolutePath()); + return tj.getAbsolutePath(); + } + } + + if (required) { + System.err.println(""); + System.err.println("Required library " + jarName + " could not be located."); + System.err.println("Make sure you using Java2 SDK " + REQUIRED_JDK + "+ and NOT the JRE."); + 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) { + String value = System.getProperty(key); + if (value != null) + return value; + return ofbizHome + "/" + props.getProperty(key, def); + } + + private String getProp(Properties props, String key, String def) { + String value = System.getProperty(key); + if (value != null) + return value; + return props.getProperty(key, def); + } + + private Properties getPropertiesFile(String config) throws IOException { + InputStream propsStream = null; + Properties props = new Properties(); + try { + // first try classpath + propsStream = getClass().getClassLoader().getResourceAsStream(config); + if (propsStream != null) { + props.load(propsStream); + } else { + throw new IOException(); + } + } catch (IOException e) { + // next try file location + File propsFile = new File(config); + if (propsFile != null) { + FileInputStream fis = null; + try { + fis = new FileInputStream(propsFile); + if (fis != null) { + props.load(fis); + } else { + throw new FileNotFoundException(); + } + } catch (FileNotFoundException e2) { + // do nothing; we will see empty props below + } finally { + if (fis != null) { + fis.close(); + } + } + } + } finally { + if (propsStream != null) { + propsStream.close(); + } + } + + // check for empty properties + if (props.isEmpty()) { + throw new IOException("Cannot load configuration properties : " + 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 + classPath.addClasspath(this.ofbizHome); + loadLibs(classPath, this.ofbizHome, false); + // load the lib directory + if (this.baseLib != null) { + loadLibs(classPath, this.baseLib, true); + } + // load the ofbiz-base.jar + if (this.baseJar != null) { + classPath.addComponent(this.baseJar); + } + // load the base schema directory + if (this.baseDtd != null) { + classPath.addComponent(this.baseDtd); + } + // load the config directory + if (this.baseConfig != null) { + classPath.addComponent(this.baseConfig); + } + classPath.instrument(this.instrumenterFile, this.instrumenterClassName); + } + + private void loadLibs(Classpath classPath, String path, boolean recurse) throws IOException { + File libDir = new File(path); + if (libDir.exists()) { + File files[] = libDir.listFiles(); + for (File file: files) { + String fileName = file.getName(); + // FIXME: filter out other files? + if (file.isDirectory() && !"CVS".equals(fileName) && !".svn".equals(fileName) && recurse) { + loadLibs(classPath, file.getCanonicalPath(), recurse); + } else if (fileName.endsWith(".jar") || fileName.endsWith(".zip")) { + classPath.addComponent(file); + } + } + } + } + + public void readConfig(String config) throws IOException { + // check the java_version + String javaVersion = System.getProperty("java.version"); + String javaVendor = System.getProperty("java.vendor"); + double version = Double.parseDouble(javaVersion.substring(0, javaVersion.indexOf(".") + 2)); + if (REQUIRED_JDK > version) { + System.err.println(""); + System.err.println("Java Version - " + javaVendor + " " + javaVersion + " - is not supported by OFBiz."); + System.err.println("Please install Java2 SDK " + REQUIRED_JDK + "+"); + System.err.println(""); + System.exit(-1); + } + + Properties props = this.getPropertiesFile(config); + System.out.println("Start.java using configuration file " + config); + + // set the ofbiz.home + if (ofbizHome == null) { + ofbizHome = props.getProperty("ofbiz.home", "."); + // get a full path + if (ofbizHome.equals(".")) { + ofbizHome = System.getProperty("user.dir"); + ofbizHome = ofbizHome.replace('\\', '/'); + System.out.println("Set OFBIZ_HOME to - " + ofbizHome); + } + } + System.setProperty("ofbiz.home", ofbizHome); + + // base config directory + baseConfig = getOfbizHomeProp(props, "ofbiz.base.config", "framework/base/config"); + + // base schema directory + baseDtd = getOfbizHomeProp(props, "ofbiz.base.schema", "framework/base/dtd"); + + // base lib directory + baseLib = getOfbizHomeProp(props, "ofbiz.base.lib", "framework/base/lib"); + + // 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"); + + // container configuration + containerConfig = getOfbizHomeProp(props, "ofbiz.container.config", "framework/base/config/ofbiz-containers.xml"); + + // get the admin server info + String serverHost = getProp(props, "ofbiz.admin.host", "127.0.0.1"); + + String adminPortStr = getProp(props, "ofbiz.admin.port", "0"); + + // set the admin key + adminKey = getProp(props, "ofbiz.admin.key", "NA"); + + // create the host InetAddress + adminAddress = InetAddress.getByName(serverHost); + + // parse the port number + try { + adminPort = Integer.parseInt(adminPortStr); + } catch (Exception e) { + adminPort = 0; + } + + // set the Derby system home + String derbyPath = getProp(props, "derby.system.home", "runtime/data/derby"); + System.setProperty("derby.system.home", derbyPath); + + // set the property to tell Log4J to use log4j.xml + String log4jConfig = getProp(props, "log4j.configuration", "log4j.xml"); + + // set the log4j configuration property so we don't pick up one inside jars by + // mistake + System.setProperty("log4j.configuration", log4jConfig); + + // check for shutdown hook + if (System.getProperty("ofbiz.enable.hook") != null && System.getProperty("ofbiz.enable.hook").length() > 0) { + useShutdownHook = "true".equalsIgnoreCase(System.getProperty("ofbiz.enable.hook")); + } else if (props.getProperty("ofbiz.enable.hook") != null && props.getProperty("ofbiz.enable.hook").length() > 0) { + useShutdownHook = "true".equalsIgnoreCase(props.getProperty("ofbiz.enable.hook")); + } + + // check for auto-shutdown + if (System.getProperty("ofbiz.auto.shutdown") != null && System.getProperty("ofbiz.auto.shutdown").length() > 0) { + shutdownAfterLoad = "true".equalsIgnoreCase(System.getProperty("ofbiz.auto.shutdown")); + } else if (props.getProperty("ofbiz.auto.shutdown") != null && props.getProperty("ofbiz.auto.shutdown").length() > 0) { + shutdownAfterLoad = "true".equalsIgnoreCase(props.getProperty("ofbiz.auto.shutdown")); + } + + // set AWT headless mode + awtHeadless = getProp(props, "java.awt.headless", null); + if (awtHeadless != null) { + System.setProperty("java.awt.headless", awtHeadless); + } + + // get the splash logo + splashLogo = props.getProperty("ofbiz.start.splash.logo", null); + + // set the property to tell Jetty to use 2.4 SessionListeners + System.setProperty("org.mortbay.jetty.servlet.AbstractSessionManager.24SessionDestroyed", "true"); + + // set the default locale + String localeString = props.getProperty("ofbiz.locale.default"); + if (localeString != null && localeString.length() > 0) { + String args[] = localeString.split("_"); + switch (args.length) { + case 1: + Locale.setDefault(new Locale(args[0])); + break; + case 2: + Locale.setDefault(new Locale(args[0], args[1])); + break; + case 3: + Locale.setDefault(new Locale(args[0], args[1], args[2])); + } + System.setProperty("user.language", localeString); + } + + // set the default time zone + String tzString = props.getProperty("ofbiz.timeZone.default"); + if (tzString != null && tzString.length() > 0) { + TimeZone.setDefault(TimeZone.getTimeZone(tzString)); + } + + instrumenterClassName = getProp(props, "ofbiz.instrumenterClassName", null); + instrumenterFile = getProp(props, "ofbiz.instrumenterFile", null); + + // loader classes + loaders = new ArrayList<String>(); + int currentPosition = 1; + while (true) { + String loaderClass = props.getProperty("ofbiz.start.loader" + currentPosition); + if (loaderClass == null || loaderClass.length() == 0) { + break; + } else { + loaders.add(loaderClass); + currentPosition++; + } + } + } + +} Modified: ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Start.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Start.java?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Start.java (original) +++ ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Start.java Fri Apr 8 08:07:00 2011 @@ -21,42 +21,85 @@ package org.ofbiz.base.start; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; -import java.io.FileNotFoundException; import java.io.IOException; -import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; -import java.lang.reflect.Method; import java.net.ConnectException; -import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; -import java.util.List; -import java.util.Locale; -import java.util.Properties; -import java.util.TimeZone; /** * Start - OFBiz Container(s) Startup Class * */ -public class Start implements Runnable { +public class Start { + + private static final String SHUTDOWN_COMMAND = "SHUTDOWN"; + private static final String STATUS_COMMAND = "STATUS"; + + public static void main(String[] args) throws IOException { + String firstArg = args.length > 0 ? args[0] : ""; + Start start = new Start(); + + if (firstArg.equals("-help") || firstArg.equals("-?")) { + System.out.println(""); + System.out.println("Usage: java -jar ofbiz.jar [command] [arguments]"); + System.out.println("-both -----> Run simultaneously the POS (Point of Sales) application and OFBiz standard"); + System.out.println("-help, -? ----> This screen"); + System.out.println("-install -----> Run install (create tables/load data)"); + System.out.println("-pos -----> Run the POS (Point of Sales) application"); + System.out.println("-setup -------> Run external application server setup"); + System.out.println("-start -------> Start the server"); + System.out.println("-status ------> Status of the server"); + System.out.println("-shutdown ----> Shutdown the server"); + System.out.println("-test --------> Run the JUnit test script"); + System.out.println("[no config] --> Use default config"); + System.out.println("[no command] -> Start the server w/ default config"); + } else { + // hack for the status and shutdown commands + if (firstArg.equals("-status")) { + start.init(args, false); + System.out.println("Current Status : " + start.status()); + } else if (firstArg.equals("-shutdown")) { + start.init(args, false); + System.out.println("Shutting down server : " + start.shutdown()); + } else { + // general start + start.init(args, true); + start.start(); + } + } + } - private Classpath classPath = new Classpath(System.getProperty("java.class.path")); - private ClassLoader classloader = null; - private ServerSocket serverSocket = null; - private Thread serverThread = null; - private boolean serverStarted = false; - private boolean serverStopping = false; - private boolean serverRunning = true; - private List<StartupLoader> loaders = new ArrayList<StartupLoader>(); private Config config = null; private String[] loaderArgs = null; + private final ArrayList<StartupLoader> loaders = new ArrayList<StartupLoader>(); + private boolean serverStarted = false; + private boolean serverStopping = false; + private Thread adminPortThread = null; - private static final String SHUTDOWN_COMMAND = "SHUTDOWN"; - private static final String STATUS_COMMAND = "STATUS"; - private static final double REQUIRED_JDK = 1.6; + private void createListenerThread() throws IOException { + if (config.adminPort > 0) { + this.adminPortThread = new AdminPortThread(); + this.adminPortThread.start(); + } else { + System.out.println("Admin socket not configured; set to port 0"); + } + } + + private void createLogDirectory() { + File logDir = new File(config.logDir); + if (!logDir.exists()) { + if (logDir.mkdir()) { + System.out.println("Created OFBiz log dir [" + logDir.getAbsolutePath() + "]"); + } + } + } + + public void init(String[] args) throws IOException { + init(args, true); + } public void init(String[] args, boolean fullInit) throws IOException { String globalSystemPropsFileName = System.getProperty("ofbiz.system.props"); @@ -67,13 +110,7 @@ public class Start implements Runnable { throw (IOException) new IOException("Couldn't load global system props").initCause(e); } } - String firstArg = args.length > 0 ? args[0] : ""; - String cfgFile = Start.getConfigFileName(firstArg); - - this.config = new Config(); - - // read the default properties first - config.readConfig(cfgFile); + this.config = Config.getInstance(args); // parse the startup arguments if (args.length > 0) { @@ -85,149 +122,32 @@ public class Start implements Runnable { // initialize the classpath initClasspath(); - // initialize the log directory - initLogDirectory(); + // create the log directory + createLogDirectory(); - // initialize the listener thread - initListenerThread(); + // create the listener thread + createListenerThread(); // set the shutdown hook if (config.useShutdownHook) { - setShutdownHook(); + Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { shutdownServer(); } }); } else { System.out.println("Shutdown hook disabled"); } // initialize the startup loaders - initStartLoaders(); - } - } - - public void init(String[] args) throws IOException { - init(args, true); - } - - public void run() { - while (serverRunning) { - try { - Socket clientSocket = serverSocket.accept(); - System.out.println("Received connection from - " + clientSocket.getInetAddress() + " : " + clientSocket.getPort()); - processClientRequest(clientSocket); - clientSocket.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - shutdownServer(); - System.exit(0); - } - - private void processClientRequest(Socket client) throws IOException { - BufferedReader reader = new BufferedReader(new InputStreamReader(client.getInputStream())); - String request = reader.readLine(); - - PrintWriter writer = new PrintWriter(client.getOutputStream(), true); - writer.println(processRequest(request, client)); - writer.flush(); - - writer.close(); - reader.close(); - } - - private String processRequest(String request, Socket client) { - if (request != null) { - String key = request.substring(0, request.indexOf(':')); - String command = request.substring(request.indexOf(':') + 1); - if (!key.equals(config.adminKey)) { - return "FAIL"; - } else { - if (command.equals(Start.SHUTDOWN_COMMAND)) { - if (serverStopping) return "IN-PROGRESS"; - Thread t = new Thread() { - @Override - public void run() { - shutdownServer(); - } - }; - t.start(); - return "OK"; - } else if (command.equals(Start.STATUS_COMMAND)) { - return serverStopping ? "Stopping" : serverStarted ? "Running" : "Starting"; - } - return "FAIL"; - } - } else { - return "FAIL"; - } - } - - private void initListenerThread() throws IOException { - if (config.adminPort > 0) { - this.serverSocket = new ServerSocket(config.adminPort, 1, config.adminAddress); - this.serverThread = new Thread(this, this.toString()); - this.serverThread.setDaemon(false); - System.out.println("Admin socket configured on - " + config.adminAddress + ":" + config.adminPort); - this.serverThread.start(); - } else { - System.out.println("Admin socket not configured; set to port 0"); - } - } - - private void loadLibs(String path, boolean recurse) throws IOException { - File libDir = new File(path); - if (libDir.exists()) { - File files[] = libDir.listFiles(); - for (File file: files) { - String fileName = file.getName(); - // FIXME: filter out other files? - if (file.isDirectory() && !"CVS".equals(fileName) && !".svn".equals(fileName) && recurse) { - loadLibs(file.getCanonicalPath(), recurse); - } else if (fileName.endsWith(".jar") || fileName.endsWith(".zip")) { - classPath.addComponent(file); - } + if (!initStartLoaders()) { + System.exit(99); } } } private void initClasspath() throws IOException { - // load tools.jar - if (config.toolsJar != null) { - classPath.addComponent(config.toolsJar); - } - - // load comm.jar - if (config.commJar != null) { - classPath.addComponent(config.commJar); - } - - // add OFBIZ_HOME to CP & load libs - classPath.addClasspath(config.ofbizHome); - loadLibs(config.ofbizHome, false); - - // load the lib directory - if (config.baseLib != null) { - loadLibs(config.baseLib, true); - } - - // load the ofbiz-base.jar - if (config.baseJar != null) { - classPath.addComponent(config.baseJar); - } - - // load the base schema directory - if (config.baseDtd != null) { - classPath.addComponent(config.baseDtd); - } - - // load the config directory - if (config.baseConfig != null) { - classPath.addComponent(config.baseConfig); - } - - classPath.instrument(config.instrumenterFile, config.instrumenterClassName); - // set the classpath/classloader + Classpath classPath = new Classpath(System.getProperty("java.class.path")); + this.config.initClasspath(classPath); + // Set the classpath/classloader System.setProperty("java.class.path", classPath.toString()); - this.classloader = classPath.getClassLoader(); + ClassLoader classloader = classPath.getClassLoader(); Thread.currentThread().setContextClassLoader(classloader); if (System.getProperty("DEBUG") != null) { System.out.println("Startup Classloader: " + classloader.toString()); @@ -235,26 +155,13 @@ public class Start implements Runnable { } } - private void initLogDirectory() { - // stat the log directory - boolean createdDir = false; - File logDir = new File(config.logDir); - if (!logDir.exists()) { - logDir.mkdir(); - createdDir = true; - } - - if (createdDir) { - System.out.println("Created OFBiz log dir [" + logDir.getAbsolutePath() + "]"); - } - } - - private void initStartLoaders() { + private boolean initStartLoaders() { + ClassLoader classloader = Thread.currentThread().getContextClassLoader(); synchronized (this.loaders) { // initialize the loaders for (String loaderClassName: config.loaders) { if (this.serverStopping) { - return; + return false; } try { Class<?> loaderClass = classloader.loadClass(loaderClassName); @@ -263,52 +170,37 @@ public class Start implements Runnable { this.loaders.add(loader); } catch (Exception e) { e.printStackTrace(); - System.exit(99); + return false; } } + this.loaders.trimToSize(); } + return true; } - private void startStartLoaders() { - synchronized (this.loaders) { - // start the loaders - for (StartupLoader loader: this.loaders) { - if (this.serverStopping) { - return; - } - try { - loader.start(); - } catch (StartupException e) { - e.printStackTrace(); - System.exit(99); - } - } - serverStarted = true; - } - } + private String sendSocketCommand(String command) throws IOException, ConnectException { + Socket socket = new Socket(config.adminAddress, config.adminPort); - private void setShutdownHook() { - try { - Method shutdownHook = java.lang.Runtime.class.getMethod("addShutdownHook", new Class[]{java.lang.Thread.class}); - Thread hook = new Thread() { - @Override - public void run() { - setName("OFBiz_Shutdown_Hook"); - shutdownServer(); - // Try to avoid JVM crash - try { - Thread.sleep(1000); - } catch (Exception e) { - e.printStackTrace(); - } - } - }; + // send the command + PrintWriter writer = new PrintWriter(socket.getOutputStream(), true); + writer.println(config.adminKey + ":" + command); + writer.flush(); - shutdownHook.invoke(Runtime.getRuntime(), new Object[]{hook}); - } catch (Exception e) { - // VM Does not support shutdown hook - e.printStackTrace(); - } + // read the reply + BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); + String response = reader.readLine(); + + reader.close(); + + // close the socket + writer.close(); + socket.close(); + + return response; + } + + public String shutdown() throws IOException { + return sendSocketCommand(Start.SHUTDOWN_COMMAND); } private void shutdownServer() { @@ -325,38 +217,42 @@ public class Start implements Runnable { } } } - serverRunning = false; - } - - private void startServer() { - // start the startup loaders - startStartLoaders(); + if (this.adminPortThread != null && this.adminPortThread.isAlive()) { + this.adminPortThread.interrupt(); + } } public void start() { - startServer(); + if (!startStartLoaders()) { + System.exit(99); + } if (config.shutdownAfterLoad) { - shutdownServer(); - System.exit(0); + stopServer(); } } - public void stop() { - shutdownServer(); - } - - /* This method is a bad idea. - public void destroy() { - this.serverSocket = null; - this.serverThread = null; - this.loaders = null; - this.config = null; - this.loaderArgs = null; - } - */ - - public String shutdown() throws IOException { - return sendSocketCommand(Start.SHUTDOWN_COMMAND); + /** + * Returns <code>true</code> if all loaders were started. + * + * @return <code>true</code> if all loaders were started. + */ + private boolean startStartLoaders() { + synchronized (this.loaders) { + // start the loaders + for (StartupLoader loader: this.loaders) { + if (this.serverStopping) { + return false; + } + try { + loader.start(); + } catch (StartupException e) { + e.printStackTrace(); + return false; + } + } + serverStarted = true; + } + return true; } public String status() throws IOException { @@ -371,405 +267,71 @@ public class Start implements Runnable { return status; } - private String sendSocketCommand(String command) throws IOException, ConnectException { - Socket socket = new Socket(config.adminAddress, config.adminPort); - - // send the command - PrintWriter writer = new PrintWriter(socket.getOutputStream(), true); - writer.println(config.adminKey + ":" + command); - writer.flush(); - - // read the reply - BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); - String response = reader.readLine(); - - reader.close(); - - // close the socket - writer.close(); - socket.close(); - - return response; + public void stopServer() { + shutdownServer(); + System.exit(0); } - public static void main(String[] args) throws IOException { - String firstArg = args.length > 0 ? args[0] : ""; - Start start = new Start(); + private class AdminPortThread extends Thread { + private ServerSocket serverSocket = null; - if (firstArg.equals("-help") || firstArg.equals("-?")) { - System.out.println(""); - System.out.println("Usage: java -jar ofbiz.jar [command] [arguments]"); - System.out.println("-both -----> Run simultaneously the POS (Point of Sales) application and OFBiz standard"); - System.out.println("-help, -? ----> This screen"); - System.out.println("-install -----> Run install (create tables/load data)"); - System.out.println("-pos -----> Run the POS (Point of Sales) application"); - System.out.println("-setup -------> Run external application server setup"); - System.out.println("-start -------> Start the server"); - System.out.println("-status ------> Status of the server"); - System.out.println("-shutdown ----> Shutdown the server"); - System.out.println("-test --------> Run the JUnit test script"); - System.out.println("[no config] --> Use default config"); - System.out.println("[no command] -> Start the server w/ default config"); - } else { - // hack for the status and shutdown commands - if (firstArg.equals("-status")) { - start.init(args, false); - System.out.println("Current Status : " + start.status()); - } else if (firstArg.equals("-shutdown")) { - start.init(args, false); - System.out.println("Shutting down server : " + start.shutdown()); - } else { - // general start - start.init(args, true); - start.start(); - } + AdminPortThread() throws IOException { + super("AdminPortThread"); + this.serverSocket = new ServerSocket(config.adminPort, 1, config.adminAddress); + setDaemon(false); } - } - private static String getConfigFileName(String command) { - // default command is "start" - if (command == null || command.trim().length() == 0) { - command = "start"; - } - - // strip off the leading dash - if (command.startsWith("-")) { - command = command.substring(1); - } - - // shutdown & status hack - if (command.equalsIgnoreCase("shutdown")) { - command = "start"; - } else if (command.equalsIgnoreCase("status")) { - command = "start"; - } - - return "org/ofbiz/base/start/" + command + ".properties"; - } - - public static class Config { - public String containerConfig; - public String testConfig; - public InetAddress adminAddress; - public int adminPort; - public String adminKey; - public String ofbizHome; - public String baseJar; - public String toolsJar; - public String commJar; - public String baseLib; - public String baseDtd; - public String baseConfig; - public String logDir; - public String instrumenterClassName; - public String instrumenterFile; - public List<String> loaders; - public String awtHeadless; - public String splashLogo; - public boolean shutdownAfterLoad = false; - public boolean useShutdownHook = true; - public boolean requireToolsJar = false; - public boolean requireCommJar = false; - - private Properties getPropertiesFile(String config) throws IOException { - InputStream propsStream = null; - Properties props = new Properties(); + private void processClientRequest(Socket client) throws IOException { + BufferedReader reader = null; + PrintWriter writer = null; try { - // first try classpath - propsStream = getClass().getClassLoader().getResourceAsStream(config); - if (propsStream != null) { - props.load(propsStream); - } else { - throw new IOException(); - } - } catch (IOException e) { - // next try file location - File propsFile = new File(config); - if (propsFile != null) { - FileInputStream fis = null; - try { - fis = new FileInputStream(propsFile); - if (fis != null) { - props.load(fis); - } else { - throw new FileNotFoundException(); - } - } catch (FileNotFoundException e2) { - // do nothing; we will see empty props below - } finally { - if (fis != null) { - fis.close(); + reader = new BufferedReader(new InputStreamReader(client.getInputStream())); + String request = reader.readLine(); + writer = new PrintWriter(client.getOutputStream(), true); + if (request != null && !request.isEmpty() && request.contains(":")) { + String key = request.substring(0, request.indexOf(':')); + String command = request.substring(request.indexOf(':') + 1); + if (key.equals(config.adminKey)) { + if (command.equals(Start.SHUTDOWN_COMMAND)) { + if (serverStopping) { + writer.println("IN-PROGRESS"); + } else { + writer.println("OK"); + writer.flush(); + stopServer(); + } + return; + } else if (command.equals(Start.STATUS_COMMAND)) { + writer.println(serverStopping ? "Stopping" : serverStarted ? "Running" : "Starting"); + return; } } } + writer.println("FAIL"); } finally { - if (propsStream != null) { - propsStream.close(); - } - } - - // check for empty properties - if (props.isEmpty()) { - throw new IOException("Cannot load configuration properties : " + config); - } - return props; - } - - private String getOfbizHomeProp(Properties props, String key, String def) { - String value = System.getProperty(key); - if (value != null) return value; - return ofbizHome + "/" + props.getProperty(key, def); - } - - private String getProp(Properties props, String key, String def) { - String value = System.getProperty(key); - if (value != null) return value; - return props.getProperty(key, def); - } - - public void readConfig(String config) throws IOException { - // check the java_version - String javaVersion = System.getProperty("java.version"); - String javaVendor = System.getProperty("java.vendor"); - double version = Double.parseDouble(javaVersion.substring(0, javaVersion.indexOf(".") + 2)); - if (REQUIRED_JDK > version) { - System.err.println(""); - System.err.println("Java Version - " + javaVendor + " " + javaVersion + " - is not supported by OFBiz."); - System.err.println("Please install Java2 SDK " + REQUIRED_JDK + "+"); - System.err.println(""); - System.exit(-1); - } - - Properties props = this.getPropertiesFile(config); - - // set the ofbiz.home - if (ofbizHome == null) { - ofbizHome = props.getProperty("ofbiz.home", "."); - // get a full path - if (ofbizHome.equals(".")) { - ofbizHome = System.getProperty("user.dir"); - ofbizHome = ofbizHome.replace('\\', '/'); - System.out.println("Set OFBIZ_HOME to - " + ofbizHome); - } - } - System.setProperty("ofbiz.home", ofbizHome); - - // base config directory - baseConfig = getOfbizHomeProp(props, "ofbiz.base.config", "framework/base/config"); - - // base schema directory - baseDtd = getOfbizHomeProp(props, "ofbiz.base.schema", "framework/base/dtd"); - - // base lib directory - baseLib = getOfbizHomeProp(props, "ofbiz.base.lib", "framework/base/lib"); - - // 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"); - - // container configuration - containerConfig = getOfbizHomeProp(props, "ofbiz.container.config", "framework/base/config/ofbiz-containers.xml"); - - // get the admin server info - String serverHost = getProp(props, "ofbiz.admin.host", "127.0.0.1"); - - String adminPortStr = getProp(props, "ofbiz.admin.port", "0"); - - // set the admin key - adminKey = getProp(props, "ofbiz.admin.key", "NA"); - - // create the host InetAddress - adminAddress = InetAddress.getByName(serverHost); - - // parse the port number - try { - adminPort = Integer.parseInt(adminPortStr); - } catch (Exception e) { - adminPort = 0; - } - - // set the Derby system home - String derbyPath = getProp(props, "derby.system.home", "runtime/data/derby"); - System.setProperty("derby.system.home", derbyPath); - - // set the property to tell Log4J to use log4j.xml - String log4jConfig = getProp(props, "log4j.configuration", "log4j.xml"); - - // set the log4j configuration property so we don't pick up one inside jars by mistake - System.setProperty("log4j.configuration", log4jConfig); - - // check for shutdown hook - if (System.getProperty("ofbiz.enable.hook") != null && System.getProperty("ofbiz.enable.hook").length() > 0) { - useShutdownHook = "true".equalsIgnoreCase(System.getProperty("ofbiz.enable.hook")); - } else if (props.getProperty("ofbiz.enable.hook") != null && props.getProperty("ofbiz.enable.hook").length() > 0) { - useShutdownHook = "true".equalsIgnoreCase(props.getProperty("ofbiz.enable.hook")); - } - - // check for auto-shutdown - if (System.getProperty("ofbiz.auto.shutdown") != null && System.getProperty("ofbiz.auto.shutdown").length() > 0) { - shutdownAfterLoad = "true".equalsIgnoreCase(System.getProperty("ofbiz.auto.shutdown")); - } else if (props.getProperty("ofbiz.auto.shutdown") != null && props.getProperty("ofbiz.auto.shutdown").length() > 0) { - shutdownAfterLoad = "true".equalsIgnoreCase(props.getProperty("ofbiz.auto.shutdown")); - } - - // set AWT headless mode - awtHeadless = getProp(props, "java.awt.headless", null); - if (awtHeadless != null) { - System.setProperty("java.awt.headless", awtHeadless); - } - - // get the splash logo - splashLogo = props.getProperty("ofbiz.start.splash.logo", null); - - // set the property to tell Jetty to use 2.4 SessionListeners - System.setProperty("org.mortbay.jetty.servlet.AbstractSessionManager.24SessionDestroyed", "true"); - - // set the default locale - String localeString = props.getProperty("ofbiz.locale.default"); - if (localeString != null && localeString.length() > 0) { - String args[] = localeString.split("_"); - switch (args.length) { - case 1: - Locale.setDefault(new Locale(args[0])); - break; - case 2: - Locale.setDefault(new Locale(args[0], args[1])); - break; - case 3: - Locale.setDefault(new Locale(args[0], args[1], args[2])); + if (reader != null) { + reader.close(); } - System.setProperty("user.language", localeString); - } - - // set the default time zone - String tzString = props.getProperty("ofbiz.timeZone.default"); - if (tzString != null && tzString.length() > 0) { - TimeZone.setDefault(TimeZone.getTimeZone(tzString)); - } - - instrumenterClassName = getProp(props, "ofbiz.instrumenterClassName", null); - instrumenterFile = getProp(props, "ofbiz.instrumenterFile", null); - - // loader classes - loaders = new ArrayList<String>(); - int currentPosition = 1; - while (true) { - String loaderClass = props.getProperty("ofbiz.start.loader" + currentPosition); - if (loaderClass == null || loaderClass.length() == 0) { - break; - } else { - loaders.add(loaderClass); - currentPosition++; + if (writer != null) { + writer.flush(); + writer.close(); } } } - 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 foundMsg = "Found " + 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()); - } - } 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()); - } - } else { - //System.out.println(foundMsg + tj.getAbsolutePath()); - return tj.getAbsolutePath(); + @Override + public void run() { + System.out.println("Admin socket configured on - " + config.adminAddress + ":" + config.adminPort); + while (!Thread.interrupted()) { + try { + Socket clientSocket = serverSocket.accept(); + System.out.println("Received connection from - " + clientSocket.getInetAddress() + " : " + clientSocket.getPort()); + processClientRequest(clientSocket); + clientSocket.close(); + } catch (IOException e) { + e.printStackTrace(); } } - - if (required) { - System.err.println(""); - System.err.println("Required library " + jarName + " could not be located."); - System.err.println("Make sure you using Java2 SDK " + REQUIRED_JDK + "+ and NOT the JRE."); - 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; } } } - - - Modified: ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/StartupLoader.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/StartupLoader.java?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/StartupLoader.java (original) +++ ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/StartupLoader.java Fri Apr 8 08:07:00 2011 @@ -43,7 +43,7 @@ public interface StartupLoader { * will halt loader loading, so it should be thrown only when OFBiz can't * operate without it. */ - public void load(Start.Config config, String args[]) throws StartupException; + public void load(Config config, String args[]) throws StartupException; /** * Start the startup class. This method must not block - implementations Modified: ofbiz/branches/jackrabbit20100709/framework/testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/framework/testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml (original) +++ ofbiz/branches/jackrabbit20100709/framework/testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml Fri Apr 8 08:07:00 2011 @@ -21,7 +21,7 @@ xsi:schemaLocation="http://docbook.org/ns/docbook ../../../../applications/content/dtd/docbook.xsd"> <title><anchor xml:id="OFBizSeleniumXml"/>OFBiz SeleniumXml</title> <para> This is a short document to help you get started using SeleniumXml to test your OFBiz application. Here is a <link - xl:href="http://us.apachecon.com/presentation/materials/118/ApacheCon2008_SeleniumXml.pdf">copy of the presentation</link> that was given + xl:href="http://www.kenfuse.com/forum/material-regarding-seleniumxmlTh">copy of the presentation</link> that was given at the ApacheCon2008 OFBiz Conference that describes more about the project. </para> <section> <title>Installing SeleniumXml</title> Modified: ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java (original) +++ ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java Fri Apr 8 08:07:00 2011 @@ -53,7 +53,7 @@ public class VerifySeleniumSetups { private static int contentLength = 0; private static Map<String,Object> josonMap = null; // Note: If the download path changes please also the update install-seleniumxml ant target - private static String urlSite = "http://downloads.sourceforge.net/seleniumxml/selenium-server-1.0.2-SNAPSHOT-standalone.jar?use_mirror="; + private static String urlSite = "http://selenium.googlecode.com/files/selenium-server-standalone-2.0b3.jar"; private static String libPath = "framework/testtools/lib/selenium-server.jar"; public VerifySeleniumSetups(){ Modified: ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java (original) +++ ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java Fri Apr 8 08:07:00 2011 @@ -23,6 +23,7 @@ import java.io.OutputStream; import java.io.StringReader; import java.io.Writer; import java.util.Iterator; +import java.util.List; import java.util.Map; import javax.servlet.ServletContext; @@ -33,8 +34,6 @@ import javax.xml.namespace.QName; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; -import javolution.util.FastMap; - import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; @@ -46,12 +45,14 @@ import org.apache.axiom.soap.SOAPFactory import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; +import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilXml; import org.ofbiz.entity.GenericDelegator; import org.ofbiz.service.DispatchContext; import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ModelService; +import org.ofbiz.service.ServiceUtil; import org.ofbiz.service.engine.SoapSerializer; import org.ofbiz.webapp.control.ConfigXMLReader.Event; import org.ofbiz.webapp.control.ConfigXMLReader.RequestMap; @@ -195,9 +196,17 @@ public class SOAPEventHandler implements createAndSendSOAPResponse(serviceResults, serviceName, response); } catch (GenericServiceException e) { - sendError(response, "Problem processing the service"); - Debug.logError(e, module); - return null; + if (UtilProperties.getPropertyAsBoolean("service", "secureSoapAnswer", true)) { + sendError(response, "Problem processing the service, check your parameters."); + } else { + if(e.getMessageList() == null) { + sendError(response, e.getMessage()); + } else { + sendError(response, e.getMessageList()); + } + Debug.logError(e, module); + return null; + } } } catch (Exception e) { sendError(response, e.getMessage()); @@ -245,7 +254,7 @@ public class SOAPEventHandler implements // instead, create the xmlns attribute directly: OMAttribute defaultNS = factory.createOMAttribute("xmlns", null, ModelService.TNS); resService.addAttribute(defaultNS); - + // log the response message if (Debug.verboseOn()) { try { @@ -263,12 +272,18 @@ public class SOAPEventHandler implements } private void sendError(HttpServletResponse res, String errorMessage) throws EventHandlerException { + // setup the response + sendError(res, ServiceUtil.returnError(errorMessage)); + } + + private void sendError(HttpServletResponse res, List<String> errorMessages) throws EventHandlerException { + sendError(res, ServiceUtil.returnError(errorMessages)); + } + private void sendError(HttpServletResponse res, Object object) throws EventHandlerException { try { // setup the response res.setContentType("text/xml"); - Map<String, Object> results = FastMap.newInstance(); - results.put("errorMessage", errorMessage); - String xmlResults= SoapSerializer.serialize(results); + String xmlResults= SoapSerializer.serialize(object); XMLStreamReader xmlReader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(xmlResults)); StAXOMBuilder resultsBuilder = new StAXOMBuilder(xmlReader); OMElement resultSer = resultsBuilder.getDocumentElement(); Modified: ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java (original) +++ ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java Fri Apr 8 08:07:00 2011 @@ -41,9 +41,8 @@ import freemarker.template.TemplateTrans */ public class OfbizContentTransform implements TemplateTransformModel { - public final static String module = OfbizUrlTransform.class.getName(); + public final static String module = OfbizContentTransform.class.getName(); - @SuppressWarnings("unchecked") private static String getArg(Map args, String key) { String result = ""; Object obj = args.get(key); @@ -63,7 +62,6 @@ public class OfbizContentTransform imple return result; } - @SuppressWarnings("unchecked") public Writer getWriter(final Writer out, Map args) { final StringBuilder buf = new StringBuilder(); final String imgSize = OfbizContentTransform.getArg(args, "variant"); Modified: ofbiz/branches/jackrabbit20100709/framework/widget/dtd/widget-form.xsd URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/dtd/widget-form.xsd?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/framework/widget/dtd/widget-form.xsd (original) +++ ofbiz/branches/jackrabbit20100709/framework/widget/dtd/widget-form.xsd Fri Apr 8 08:07:00 2011 @@ -957,7 +957,7 @@ under the License. <xs:annotation><xs:documentation>The name of a field whose value is also filled when coming back from lookup selection.</xs:documentation></xs:annotation> </xs:attribute> <xs:attribute type="xs:string" name="target-parameter"> - <xs:annotation><xs:documentation>The name of a field whose value is passed in as a parameter to the lookup target form. Can be a comma separated list. You need to affect it the value using parameters.parmI (where I is the position number in the list, begins at 1) in the related lookup screen. See LookupPreferredContactMech as example</xs:documentation></xs:annotation> + <xs:annotation><xs:documentation>The name of a field whose value is passed in as a parameter to the lookup target form. Can be a comma separated list. You need to affect it the value using parameters.parmI (where I is the position number in the list, I must begin at 0) in the related lookup screen. See LookupPreferredContactMech as example</xs:documentation></xs:annotation> </xs:attribute> <xs:attribute name="client-autocomplete-field" default="true"> <xs:annotation><xs:documentation>Tells the browser whether or not to try and autocomplete with values previously entered. Default to true.</xs:documentation></xs:annotation> Modified: ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original) +++ ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Fri Apr 8 08:07:00 2011 @@ -132,9 +132,9 @@ public class MacroFormRenderer implement templateReader.close(); environment.include(template); } catch (TemplateException e) { - Debug.logError(e, "Error rendering screen thru ftl", module); + Debug.logError(e, "Error rendering screen thru ftl macro: " + macro, module); } catch (IOException e) { - Debug.logError(e, "Error rendering screen thru ftl", module); + Debug.logError(e, "Error rendering screen thru ftl, macro: " + macro, module); } } Modified: ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java (original) +++ ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java Fri Apr 8 08:07:00 2011 @@ -192,7 +192,8 @@ public class ScreenRenderer { HttpSession session = request.getSession(); // attribute names to skip for session and application attributes; these are all handled as special cases, duplicating results and causing undesired messages - Set<String> attrNamesToSkip = UtilMisc.toSet("delegator", "dispatcher", "authz", "security", "webSiteId"); + Set<String> attrNamesToSkip = UtilMisc.toSet("delegator", "dispatcher", "authz", "security", "webSiteId", + "org.apache.catalina.jsp_classpath"); Map<String, Object> parameterMap = UtilHttp.getCombinedMap(request, attrNamesToSkip); GenericValue userLogin = (GenericValue) session.getAttribute("userLogin"); Propchange: ofbiz/branches/jackrabbit20100709/specialpurpose/ebaystore/lib/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Apr 8 08:07:00 2011 @@ -2,4 +2,4 @@ /ofbiz/branches/dojo1.4/specialpurpose/ebaystore/lib:951708-952957 /ofbiz/branches/jquery/specialpurpose/ebaystore/lib:952958-1044489 /ofbiz/branches/multitenant20100310/specialpurpose/ebaystore/lib:921280-927264 -/ofbiz/trunk/specialpurpose/ebaystore/lib:962442-1084618 +/ofbiz/trunk/specialpurpose/ebaystore/lib:962442-1090146 Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl (original) +++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl Fri Apr 8 08:07:00 2011 @@ -18,6 +18,7 @@ under the License. --> <#-- variable setup --> <#assign price = priceMap?if_exists /> +<#assign productImageList = productImageList?if_exists /> <#-- end variable setup --> <#-- virtual product javascript --> @@ -343,8 +344,7 @@ ${virtualVariantJavaScript?if_exists} <hr /> <div id="productImageBox"> - <#assign userLoginSecurityGroup = delegator.findByAnd("UserLoginSecurityGroup", Static["org.ofbiz.base.util.UtilMisc"].toMap("groupId", "IMAGEADMIN"))> - <#if userLoginSecurityGroup != null && userLoginSecurityGroup?has_content> + <#if productImageList != null && productImageList?has_content> <#-- Product image/name/price --> <div id="detailImageBox"> <#assign productLargeImageUrl = productContentWrapper.get("LARGE_IMAGE_URL")?if_exists /> @@ -361,20 +361,12 @@ ${virtualVariantJavaScript?if_exists} </#if> </div> <#-- Show Image Approved --> - <#assign productContentAndInfos = delegator.findByAnd("ProductContentAndInfo", {"productId", product.productId?if_exists, "productContentTypeId", "IMAGE", "statusId", "IM_APPROVED", "drIsPublic", "Y"}, Static["org.ofbiz.base.util.UtilMisc"].toList("sequenceNum"))> <div id="additionalImageBox"> - <#if productContentAndInfos?has_content> - <#list productContentAndInfos as productContentAndInfo> - <#assign contentAssocs = delegator.findByAnd("ContentAssoc",Static["org.ofbiz.base.util.UtilMisc"].toMap("contentId", productContentAndInfo.contentId?if_exists, "contentAssocTypeId", "IMAGE_THUMBNAIL"))/> - <#if contentAssocs?has_content> - <#list contentAssocs as contentAssoc> - <#assign ImageContent = delegator.findByPrimaryKey("Content", Static["org.ofbiz.base.util.UtilMisc"].toMap("contentId", contentAssoc.contentIdTo))?if_exists> - <#assign contentDataResourceView = delegator.findByPrimaryKey("ContentDataResourceView", Static["org.ofbiz.base.util.UtilMisc"].toMap("contentId", contentAssoc.contentIdTo, "drDataResourceId", ImageContent.dataResourceId))?if_exists> - <div class="additionalImage"> - <a href="javascript:void(0);" swapDetail="<@ofbizContentUrl>${productContentAndInfo.drObjectInfo}</@ofbizContentUrl>"><img src="<@ofbizContentUrl>${contentDataResourceView.drObjectInfo}</@ofbizContentUrl>" vspace="5" hspace="5" alt="" /></a> - </div> - </#list> - </#if> + <#if productImageList?has_content> + <#list productImageList as productImage> + <div class="additionalImage"> + <a href="javascript:void(0);" swapDetail="<@ofbizContentUrl>${productImage.productImage}</@ofbizContentUrl>"><img src="<@ofbizContentUrl>${productImage.productImageThumb}</@ofbizContentUrl>" vspace="5" hspace="5" alt="" /></a> + </div> </#list> </#if> </div> Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/widget/CommonScreens.xml?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/widget/CommonScreens.xml (original) +++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/widget/CommonScreens.xml Fri Apr 8 08:07:00 2011 @@ -42,7 +42,7 @@ under the License. <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/validate/jquery.validate.min.js" global="true"/> - <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.5.1.min.js" global="true"/> + <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.5.2.min.js" global="true"/> <script location="component://ecommerce/widget/EcommerceSetup.groovy"/> @@ -251,7 +251,7 @@ under the License. <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/validate/jquery.validate.min.js" global="true"/> - <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.5.1.min.js" global="true"/> + <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.5.2.min.js" global="true"/> <script location="component://ecommerce/widget/EcommerceSetup.groovy"/> Propchange: ofbiz/branches/jackrabbit20100709/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Apr 8 08:07:00 2011 @@ -2,4 +2,4 @@ /ofbiz/branches/dojo1.4/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:951708-952957 /ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:952958-1044489 /ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:921280-927264 -/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:962442-1084618 +/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:962442-1090146 Propchange: ofbiz/branches/jackrabbit20100709/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Apr 8 08:07:00 2011 @@ -2,4 +2,4 @@ /ofbiz/branches/dojo1.4/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:951708-952957 /ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:952958-1044489 /ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:921280-927264 -/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:962442-1084618 +/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:962442-1090146 Propchange: ofbiz/branches/jackrabbit20100709/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Apr 8 08:07:00 2011 @@ -2,4 +2,4 @@ /ofbiz/branches/dojo1.4/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:951708-952957 /ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:952958-1044489 /ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:921280-927264 -/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:962442-1084618 +/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:962442-1090146 Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ofbizwebsite/template/HtmlHead.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ofbizwebsite/template/HtmlHead.ftl?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/specialpurpose/ofbizwebsite/template/HtmlHead.ftl (original) +++ ofbiz/branches/jackrabbit20100709/specialpurpose/ofbizwebsite/template/HtmlHead.ftl Fri Apr 8 08:07:00 2011 @@ -28,7 +28,7 @@ under the License. <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> <title>${(uiLabelMap.OfbizTitle)!"OFBiz, The Apache Open For Business Project"}</title> <link rel="shortcut icon" href="/ofbiz/images/favicon.ico"> - <script language="javascript" src="/images/jquery/jquery-1.5.1.min.js" type="text/javascript"></script> + <script language="javascript" src="/images/jquery/jquery-1.5.2.min.js" type="text/javascript"></script> <script language="javascript" src="/images/fieldlookup.js" type="text/javascript"></script> <script language="javascript" src="/images/selectall.js" type="text/javascript"></script> <script language="javascript" src="/ofbiz/script/search.js" type="text/javascript"></script> Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/projectmgr/widget/ProjectMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/projectmgr/widget/ProjectMenus.xml?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/specialpurpose/projectmgr/widget/ProjectMenus.xml (original) +++ ofbiz/branches/jackrabbit20100709/specialpurpose/projectmgr/widget/ProjectMenus.xml Fri Apr 8 08:07:00 2011 @@ -233,6 +233,7 @@ <condition> <and> <if-compare field="hasUpdatePermission" operator="equals" value="true"/> + <if-has-permission permission="PROJECTMGR" action="_ADMIN"/> </and> </condition> <link target="EditProject"/> Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/projectmgr/widget/TaskScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/projectmgr/widget/TaskScreens.xml?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/specialpurpose/projectmgr/widget/TaskScreens.xml (original) +++ ofbiz/branches/jackrabbit20100709/specialpurpose/projectmgr/widget/TaskScreens.xml Fri Apr 8 08:07:00 2011 @@ -516,6 +516,7 @@ under the License. <section> <condition> <or> + <if-has-permission permission="PROJECTMGR_ADMIN"/> <if-has-permission permission="PROJECTMGR_ROLE_ADMIN"/> <if-has-permission permission="PROJECTMGR_ROLE_TASK_CREATE"/> <if-has-permission permission="PROJECTMGR_ROLE_UPDATE"/> Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/webpos/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/webpos/widget/CommonScreens.xml?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/specialpurpose/webpos/widget/CommonScreens.xml (original) +++ ofbiz/branches/jackrabbit20100709/specialpurpose/webpos/widget/CommonScreens.xml Fri Apr 8 08:07:00 2011 @@ -44,12 +44,12 @@ under the License. <set field="layoutSettings.javaScripts[+0]" value="/images/selectall.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon-0.9.3.min.js" global="true"/> - <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/js/jquery-ui-1.8.6.custom.min.js" global="true"/> + <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/js/jquery-ui-1.8.11.custom.min.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/validate/jquery.validate.min.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/jquery.ui.datepicker.js" global="true"/> <set field="initialLocale" type="String" value="${parameters.userLogin.lastLocale}" default-value="${groovy:locale.toString()}"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-${initialLocale}.js" global="true"/> - <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.5.1.min.js" global="true"/> + <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.5.2.min.js" global="true"/> <script location="component://webpos/widget/WebPosSetup.groovy"/> Modified: ofbiz/branches/jackrabbit20100709/startofbiz.sh URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/startofbiz.sh?rev=1090153&r1=1090152&r2=1090153&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/startofbiz.sh (original) +++ ofbiz/branches/jackrabbit20100709/startofbiz.sh Fri Apr 8 08:07:00 2011 @@ -53,3 +53,5 @@ fi #$JAVA $VMARGS -jar ofbiz.jar $* >>$OFBIZ_LOG 2>>$OFBIZ_LOG& exec "$JAVA" $VMARGS -jar ofbiz.jar "$@" +# Allow To Run From Jenkins. See http://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller. Drawback: the calling Jenkins job does not terminate +#BUILD_ID=dontKillMe |
Free forum by Nabble | Edit this page |