in winegrower-core/src/main/java/org/apache/winegrower/deployer/OSGiBundleLifecycle.java [51:75]
public OSGiBundleLifecycle start() {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Starting {}", bundle);
}
final String activatorClass = context.getManifest().getMainAttributes().getValue("Bundle-Activator");
if (activatorClass != null) {
try {
activator = new BundleActivatorHandler(BundleActivator.class.cast(getBundle().getLoader()
.loadClass(activatorClass)
.getConstructor()
.newInstance()), context);
activator.start();
} catch (final NoClassDefFoundError | InstantiationException | IllegalAccessException |
NoSuchMethodException | ClassNotFoundException e) {
throw new IllegalArgumentException(e);
} catch (final InvocationTargetException e) {
throw new IllegalArgumentException(e.getTargetException());
}
}
bundle.onStart();
return this;
}