felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-577) Problems with the bundle url protocol
Date Mon, 02 Jun 2008 14:29:44 GMT

    [ https://issues.apache.org/jira/browse/FELIX-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601635#action_12601635
] 

Guillaume Nodet commented on FELIX-577:
---------------------------------------

The patch already does that afaik.
See the following patch fragment:

{code}
+        // If the revision is not specified, check the latest
+        if (revision < 0)
+        {
+            revision = modules.length - 1;
+        }
{code}

I may have missed something in the way revisions work though...

> 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.


Mime
View raw message