Precedence/order of resolution of an instance's runmode coming from different configurations
Hello, I'm trying to figure out the order of precedence/resolution if one configures different run modes for the same instance using the different methods available, such as naming the jar file, passing in system or JVM arguments, and configuration in sling.properties.
The following documentation http://helpx.adobe.com/experience-manager/kb/RunModeSetUp.html says the following:
Behavior When Run Modes Are Specified More than One Way
The run mode specified in the naming of the jar file takes precedence. If run modes are not specified in the naming of the jar file, the values in the sling.properties file are used. If run modes are not specified in the either the naming of the jar file or the sling.properties file, the system property (or JVM argument) is used.
So this implies that the jar overrides the run mode set in sling.properties which overrides anything passed in through a system property (-D) or a JVM argument (-r)
Meanwhile, this documentation http://docs.adobe.com/docs/en/aem/6-0/deploy/configuring/configure-runmodes.html has a conflicting order:
Starting CQ with a specific run mode
If you have defined configurations for multiple run modes then you need to define which is to be used upon startup. There are several methods for specifying which run mode to use; the order of resolution is:
So the latter documentation implies that sling.properties takes precedence over JVM and System arguments, which take precedence over the naming of the jar.
Can anyone enlighten me as to what the actual order is? A couple of colleagues tested it and said system arguments took precedence, then sling properties, then the naming of the jar, so I've got three conflicting orders and I don't know which one to take as truth.