Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343352 - Activating the org.eclipse.jetty.osgi.boot bundle when one of the factory method is called
Summary: Activating the org.eclipse.jetty.osgi.boot bundle when one of the factory met...
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: osgi (show other bugs)
Version: 7.4.0   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: 7.2.x   Edit
Assignee: Hugues Malphettes CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-20 04:18 EDT by Hugues Malphettes CLA
Modified: 2011-04-20 19:49 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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...