You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2008/05/30 10:53:45 UTC

[jira] Updated: (FELIX-577) Problems with the bundle url protocol

     [ https://issues.apache.org/jira/browse/FELIX-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated FELIX-577:
----------------------------------

    Attachment: FELIX-577.patch

> Problems with the bundle url protocol
> -------------------------------------
>
>                 Key: FELIX-577
>                 URL: https://issues.apache.org/jira/browse/FELIX-577
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.0.4
>            Reporter: Guillaume Nodet
>             Fix For: felix-1.0.5
>
>         Attachments: FELIX-577.patch
>
>
> The "bundle:" protocol URL handler is built in Felix framework, but
> does not seem to work well for me at the moment.  The idea behing this
> URL handler is to be able to access any resource inside a bundle.  The
> syntax is as following:
>   bundle://[bundleId].[bundleRev]:[classPathId]/[path]
> where [bundleId] is the id of the bundle, [bundleRev] is the revision
> of the bundle (when new versions are installed), [classPathId] is the
> index in the list of jars that make the classpath (internal structure)
> and [path] is the path of the resource in the bundle.
> My problem is that [bundleRev] and [classPathId] refer to internal
> structures and can't be accessed from outside the felix framework.
> [classPathId] can be set to 0 to look inside the whole classpath
> entries, but if not specified, the default value of the url port is -1
> and an IndexOutOfBounds exception is thrown.
> Another problem is that [bundleRev] can not be ommitted and (in
> addition to the parsing having a bug) there is no default value.
> I will raise a JIRA and attach a patch to do the following:
>  * if the url port is ommitted (thus defaults to -1), use the same
> behavior as if 0 was used (search in the whole classpath)
>  * fix the revision bundle parsing, which returns the bundle id if
> none is specified: it will return -1 if the bundle revision was not
> set
>  * fix the look up mechanism so that when no bundle revision is
> specified, (revision == -1), all bundle revisions will be searched in
> reverse order (the most recent revision first)
> The last problem is really difficult to work around as there is no way
> to find the bundle revision from a client bundle and there is no
> default value, so the only way to make that work is to specify 0 and
> expect the bundle to have not been updated (which ovbiously is not a
> good idea).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.