felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-6) Re-implement URL Handlers service
Date Wed, 14 Sep 2005 14:07:54 GMT
    [ http://issues.apache.org/jira/browse/FELIX-6?page=comments#action_12324525 ] 

Richard S. Hall commented on FELIX-6:

The basics are now working in my development copy, but I want to refactor the current solution
to support multiple framework instances in memory at the same time, which will require a static
implementation where framework instances register and the resource URL includes a framework
instance identifier.

> Re-implement URL Handlers service
> ---------------------------------
>          Key: FELIX-6
>          URL: http://issues.apache.org/jira/browse/FELIX-6
>      Project: Felix
>         Type: Improvement
>     Reporter: Richard S. Hall
>     Assignee: Richard S. Hall

> The URL Handlers service was previously distributed as a separate bundle in Oscar, but
this approach is infeasible due to changes in the spec as well as changes in the framework
implementation itself to support ClassLoader.getResources().
> In short, the R4 spec says that it must be possible to create resource URLs from strings,
thus this requires that the framework register a stream handler factory. Further, to support
access to resources inside embedded JAR files inside a bundle JAR file for ClassLoader.getResources(),
it is necessary to encode in the returned URL which embedded JAR the resource is in, e.g.:
>     http://<bundle-id>/<embedded-jar>/<path-to-resource>
> The framework already extracts the embedded JAR files for more efficient access and no
other bundles can access the extracted embedded JAR files in the bundle cache, so it makes
sense that only the framework can implement this efficiently.
> So, URL Handlers service should be implemented by the framework, however, there should
be a property that enables/disables the setting of the URL stream handler factory, because
some applications that will embed Felix may not want this set since it is a singleton. If
this is disabled, though, it will not be spec compliant and it will not be possible to create
resource URLs from strings (which is how R3 worked).

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message