use of com.alipay.sofa.ark.bootstrap.ClasspathLauncher in project sofa-ark by alipay.
the class EmbedSofaArkBootstrap method launch.
public static void launch(Environment environment) {
if (started.compareAndSet(false, true)) {
EntryMethod entryMethod = new EntryMethod(Thread.currentThread());
getOrSetDefault(Constants.MASTER_BIZ, environment.getProperty(Constants.MASTER_BIZ, environment.getProperty("spring.application.name")));
getOrSetDefault(Constants.BIZ_CLASS_LOADER_HOOK_DIR, environment.getProperty(Constants.BIZ_CLASS_LOADER_HOOK_DIR));
getOrSetDefault(Constants.PLUGIN_EXPORT_CLASS_ENABLE, environment.getProperty(Constants.PLUGIN_EXPORT_CLASS_ENABLE, "false"));
getOrSetDefault(Constants.BIZ_CLASS_LOADER_HOOK_DIR, DelegateToMasterBizClassLoaderHook.class.getName());
try {
URL[] urls = getURLClassPath();
ClasspathLauncher launcher = new ClasspathLauncher(new EmbedClassPathArchive(entryMethod.getDeclaringClassName(), entryMethod.getMethod().getName(), urls));
launcher.launch(new String[] {}, getClasspath(urls), entryMethod.getMethod());
} catch (Throwable e) {
throw new RuntimeException(e);
}
}
}
use of com.alipay.sofa.ark.bootstrap.ClasspathLauncher in project sofa-ark by alipay.
the class SofaArkBootstrap method remain.
private static void remain(String[] args) throws Exception {
// NOPMD
AssertUtils.assertNotNull(entryMethod, "No Entry Method Found.");
URL[] urls = getURLClassPath();
new ClasspathLauncher(new ClassPathArchive(entryMethod.getDeclaringClassName(), entryMethod.getMethodName(), urls)).launch(args, getClasspath(urls), entryMethod.getMethod());
}
Aggregations