=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/startup/DefaultStartupRoutineExecutor.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/startup/DefaultStartupRoutineExecutor.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/startup/DefaultStartupRoutineExecutor.java 2013-10-04 09:01:42 +0000
@@ -36,9 +36,14 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import static org.hisp.dhis.datavalue.DataValue.TRUE;
+
/**
* Default implementation of StartupRoutineExecutor. The execute method will
- * execute the added StartupRoutines ordered by their runlevels.
+ * execute the added StartupRoutines ordered by their runlevels. Startup routines
+ * can be ignored from the command line by appending the below.
+ *
+ * -Ddhis.skip.startup=true
*
* @author Torgeir Lorange Ostby
* @version $Id: DefaultStartupRoutineExecutor.java 5781 2008-10-01 12:12:48Z larshelg $
@@ -49,6 +54,8 @@
{
private static final Log LOG = LogFactory.getLog( DefaultStartupRoutineExecutor.class );
+ private static final String SKIP_PROP = "dhis.skip.startup";
+
private List routines = new ArrayList();
// -------------------------------------------------------------------------
@@ -87,6 +94,12 @@
private void execute( boolean testing )
throws Exception
{
+ if ( TRUE.equalsIgnoreCase( System.getProperty( SKIP_PROP ) ) )
+ {
+ LOG.info( "Skipping startup routines" );
+ return;
+ }
+
Collections.sort( routines, new StartupRoutineComparator() );
int total = routines.size();