Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343352

Summary: Activating the org.eclipse.jetty.osgi.boot bundle when one of the factory method is called
Product: [RT] Jetty Reporter: Hugues Malphettes <hmalphettes>
Component: osgiAssignee: Hugues Malphettes <hmalphettes>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: jetty-inbox
Version: 7.4.0   
Target Milestone: 7.2.x   
Hardware: All   
OS: All   
Whiteboard:

Description Hugues Malphettes CLA 2011-04-20 04:18:53 EDT
Since bug 329571
org.eclipse.jetty.osgi.boot does not have a lazy activation policy.
This requires consumers of jetty-osgi to explicitly start the bundle.
It usually happens via the RT product configuration.
However it would be nice to check that the bundle is started when one of the static factory methods of org.eclipse.osgi.boot.JettyBootstrapActivator is called.
Comment 1 Hugues Malphettes CLA 2011-04-20 19:49:20 EDT
Done with commit 3024
For versions prior to 7.4.1, the workaround consists of forcing the bundle to start before the JettyBoostrapActivator static methods are called.
For example:
if (JettyBootstrapActivator.getInstance() == null) {
    Bundle jettyBoot = FrameworkUtil.getBundle(JettyBootstrapActivator.class);
    jettyBoot.start();
}
//now we can call JettyBootstrapActivator.registerWebapp...