| Summary: | jetty-7 in OSGi should support fragment-xml and annotations | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Hugues Malphettes <hmalphettes> |
| Component: | osgi | Assignee: | Hugues Malphettes <hmalphettes> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jetty-inbox |
| Version: | 7.4.1 | ||
| Target Milestone: | 7.4.x | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Hugues Malphettes
Support for osgi fragment bundles that contain META-INF/web-fragment.xml and META-INF/resources is committed. The latest version of OSGi implemented by equinox supports a new API to introspect the dependencies of a bundle (the package org.osgi.framework.wiring). It would allow us to cleanly get the import packages required bundles and other info for a web-bundle. However it is not supported by felix. I think we need to parse the manifest headers we are interested in ourselves. It is in fact not possible to define a custom attribute for Require-Bundle and Import-Package. At the moment, the default behavior is to assume that each required bundle behaves like a jar in WEB-INF/lib: it is looked up for the META-INF/resources, META-INF/*.tld, META-INF/web-fragment.xml, and the annotations are scanned. This behavior is also applied to the osgi fragments. If we need a different behavior we could introduce some custom headers in the manifest. OK in fact annotations in jetty-7 are not discoverable: annotations on a servlet, a filter or a listener that are declared in a web.xml or in a web-fragment.xml are processed. But a class that is annotated to declare a servlet is not discovered. That is the realm of servlet-3.0 So marking this bug as fixed. |