incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1242046 - /sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/StartupManager.java
Date Wed, 08 Feb 2012 19:24:27 GMT
Author: cziegeler
Date: Wed Feb  8 19:24:26 2012
New Revision: 1242046

URL: http://svn.apache.org/viewvc?rev=1242046&view=rev
Log:
SLING-2376 : New Startup Features

Modified:
    sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/StartupManager.java

Modified: sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/StartupManager.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/StartupManager.java?rev=1242046&r1=1242045&r2=1242046&view=diff
==============================================================================
--- sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/StartupManager.java
(original)
+++ sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/StartupManager.java
Wed Feb  8 19:24:26 2012
@@ -46,6 +46,9 @@ public class StartupManager {
     /** The old data file. */
     private static final String OLD_DATA_FILE = "bundle0" + File.separatorChar + "bootstrapinstaller.ser";
 
+    /** Name of the mode override property. */
+    private static final String OVERRIDE_RPOP = "org.apache.sling.launchpad.startupmode";
+
     /**
      * The {@link Logger} use for logging messages during installation and
      * startup.
@@ -67,7 +70,14 @@ public class StartupManager {
         this.logger = logger;
         this.startupDir = DirectoryUtil.getStartupDir(properties);
         this.confDir = DirectoryUtil.getConfigDir(properties);
-        this.mode = detectMode(properties.get(Constants.FRAMEWORK_STORAGE));
+        // check for override property
+        final String overrideMode = System.getProperty(OVERRIDE_RPOP);
+        if ( overrideMode != null ) {
+            this.mode = StartupMode.valueOf(overrideMode.toUpperCase());
+        } else {
+            this.mode = detectMode(properties.get(Constants.FRAMEWORK_STORAGE));
+        }
+
         this.logger.log(Logger.LOG_INFO, "Starting in mode " + this.mode);
 
         this.targetStartLevel = Long.valueOf(properties.get(Constants.FRAMEWORK_BEGINNING_STARTLEVEL));



Mime
View raw message