return descriptor.getBootstrapClassName() != null;
}
private Bootstrap createBootstrap() throws DeploymentException {
ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
ComponentDesc descriptor = installationContext.getDescriptor();
try {
ClassLoader cl = createClassLoader(
getBundle(),
installationContext.getInstallRoot(),
descriptor.getBootstrapClassPath().getPathElements(),
descriptor.isBootstrapClassLoaderDelegationParentFirst(),
null);
Thread.currentThread().setContextClassLoader(cl);
Class bootstrapClass = cl.loadClass(descriptor.getBootstrapClassName());
return (Bootstrap) bootstrapClass.newInstance();
} catch (ClassNotFoundException e) {
LOGGER.error("Class not found: " + descriptor.getBootstrapClassName(), e);
throw new DeploymentException(e);
} catch (InstantiationException e) {
LOGGER.error("Could not instantiate : " + descriptor.getBootstrapClassName(), e);
throw new DeploymentException(e);
} catch (IllegalAccessException e) {
LOGGER.error("Illegal access on: " + descriptor.getBootstrapClassName(), e);
throw new DeploymentException(e);
} finally {
Thread.currentThread().setContextClassLoader(oldCl);
}
}