maybe I don't understand but why should we want this?

Jacopo

On Apr 1, 2012, at 1:27 PM, [email protected] wrote:

> Author: jleroux
> Date: Sun Apr  1 11:27:45 2012
> New Revision: 1308078
> 
> URL: http://svn.apache.org/viewvc?rev=1308078&view=rev
> Log:
> A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug 
> mode,i.e with -DDEBUG=true set on theJVM arguments" 
> https://issues.apache.org/jira/browse/OFBIZ-3790
> 
> This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true 
> on the JVM arguments, and avoid to exit from the process when a Error or a 
> StartupException occurs.
> 
> jleroux: replaced tabs by 4 spaces
> 
> Modified:
>    ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
> 
> Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
> URL: 
> http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1308078&r1=1308077&r2=1308078&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
> +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sun Apr  
> 1 11:27:45 2012
> @@ -37,7 +37,7 @@ import java.util.List;
>  *
>  */
> public class Start {
> -
> +      private static final String DEBUG = System.getProperty("DEBUG");
>     private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
>     private static final String STATUS_COMMAND = "STATUS";
> 
> @@ -206,7 +206,7 @@ public class Start {
>         System.setProperty("java.class.path", classPath.toString());
>         ClassLoader classloader = classPath.getClassLoader();
>         Thread.currentThread().setContextClassLoader(classloader);
> -        if (System.getProperty("DEBUG") != null) {
> +        if (DEBUG != null) {
>             System.out.println("Startup Classloader: " + 
> classloader.toString());
>             System.out.println("Startup Classpath: " + classPath.toString());
>         }
> @@ -310,7 +310,12 @@ public class Start {
>                     loader.start();
>                 } catch (StartupException e) {
>                     e.printStackTrace();
> -                    return false;
> +                    if (DEBUG == null)
> +                        return false;
> +                } catch(Error e) {
> +                    e.printStackTrace();
> +                    if (DEBUG == null)
> +                        return false;
>                 }
>             }
>             serverStarted = true;
> 
> 

Reply via email to