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

Richard S. Hall commented on FELIX-2560:
----------------------------------------

After looking into this a little bit more, I don't think it would necessarily 
have to impact the bundle cache in any structural way. The main issue is to not 
reset the revision-id on a refresh.

Normally, a revision directory is named something like version0.0 and after an 
update a new revision directory is created called version0.1. The first number 
is a refresh counter, while the second number is the revision-id. During a 
refresh, the version0.0 directory is deleted and the version0.1 directory is 
renamed to version1.0.

So, the simple solution is to keep the revision-id as just an increasing number 
that doesn't reset. Instead of renaming the above current revision directory to 
version1.0 on a refresh, we'd rename it to version1.1. Likewise if there were 
two more updates, followed by a refresh, then the current revision directory 
would be version2.3, since there would have been three updates and two 
refreshes total.

> Bundle URLs do not survive refreshes
> ------------------------------------
>
>                 Key: FELIX-2560
>                 URL: https://issues.apache.org/jira/browse/FELIX-2560
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.2
>            Reporter: Richard S. Hall
>            Priority: Minor
>             Fix For: framework-3.2.0
>
>
> Currently, bundle URLs are encoded like this:
>     bundle:// <bundle-id> . <revision-id> : <class-path-idx>/path/to/resource
> This is convenient to access our internal data structures and survives 
> toString() round-tripping, but it does have the disadvantage that it doesn't 
> survive a module being refreshed. The <revision-id> of a module gets reset 
> after a refresh, which makes existing URLs become invalid. If <revision-id> 
> were something like a <revision-name> that didn't get reset, then it would 
> continue to work.
> This is clearly a corner case and not super important, but we could 
> investigate making such a change. It may impact the bundle cache too. This is 
> also not spec-mandated behavior, so bundles shouldn't really depend on this 
> behavior either.

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

Reply via email to