// Do not add options which are not applicable for stop action.
// For ex. debug options and profiler options.
// In other words add the following options ony when the action
// is other than stop.
Profiler profiler=javaConfig.getProfiler();
String profilerClasspath=null;
if (!action.equals(LAUNCHER_STOP_ACTION)) {
// The debug options including the debug port would be added
// to the command when the action is start.
// If the action is stop adding the same port to the java command
// would stack up the ports and block until the port assigned for
// start action is released. To avoid this we check for stop action.
// If the stop action needs to be debugged then one work around is to
// copy the java command from server.log, change the debug settings and
// run the command.
// debug options
if ((javaConfig.isDebugEnabled() || isDebugEnabled())) {
// add debug statements
addDebugOptions(command, javaConfig.getDebugOptions());
}
// add profiler properties & jvm args
if (profiler != null && profiler.isEnabled()) {
// add config properties
addElementProperties(profiler.getElementProperty(), systemProperties);
String [] jvmOptions=profiler.getJvmOptions();
addJvmOptions(command, jvmOptions, action);
profilerClasspath=profiler.getClasspath();
}
}
// set the default locale specified in domain.xml config file
String locale=domain.getLocale();