URL systemScdl = booter.getSystemScdl(bootClassLoader);
URL applicationScdl = booter.getApplicationScdl(applicationClassLoader);
String className = System.getProperty("tuscany.launcherClass",
"org.apache.tuscany.runtime.standalone.host.StandaloneRuntimeImpl");
TuscanyRuntime runtime = (TuscanyRuntime) Beans.instantiate(bootClassLoader, className);
runtime.setMonitorFactory(runtime.createDefaultMonitorFactory());
runtime.setSystemScdl(systemScdl);
runtime.setHostClassLoader(hostClassLoader);
runtime.setApplicationName("application");
runtime.setApplicationScdl(applicationScdl);
runtime.setApplicationClassLoader(applicationClassLoader);
runtime.setRuntimeInfo(runtimeInfo);
runtime.initialize();
SCA context = runtime.getContext();
try {
context.start();
booter.runApplication(applicationJar, applicationClassLoader, appArgs);
} finally {
context.stop();
runtime.destroy();
}
}