// this will be whacked to the instance's value below by ASLauncher
System.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY, nodeAgentRoot);
if(nativeLauncher)
{
ASNativeLauncher launcher = new ASNativeLauncher(this);
launcher.preProcess(launcherArgs, envProps);
try
{
process = launcher.launch(launcherArgs, securityInfo);
}
catch(ASLauncherException e)
{
throw new InstanceException(e);
}
}
else
{
final ASLauncher launcher = new ASLauncher();
launcher.setRefreshConfigContext(_config.getRefreshConfigContext());
launcher.preProcess(launcherArgs, envProps);
final String instanceRoot = launcher.getInstanceRoot();
process = launcher.process(launcherArgs, securityInfo);
// explicitly detect a race condition with system property for instance root
final String valueNow = System.getProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY);
if ( ! instanceRoot.equals(valueNow) )
{