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

[jira] Created: (FELIX-758) Updated version of a module imports its old version's packages

Updated version of a module imports its old version's packages
--------------------------------------------------------------

                 Key: FELIX-758
                 URL: https://issues.apache.org/jira/browse/FELIX-758
             Project: Felix
          Issue Type: Bug
          Components: Framework
            Reporter: Sylvain MARIE
            Priority: Minor


Hi all,

In the OSGi specification R4.0.1, 
"An updated bundle must directly provide its exported packages to the system.
At the same time, packages exported by the previous version continue
to be available, for existing and future bundles, until the refreshPackages
method has been called or the Framework is restarted."

It is not clear if the new version of the bundle has the right to import packages from its old version before the refresh is done. Anyway in Felix this happens: in certain cases the resolver creates wires such as 

WIRE: 4.1 -> com.bugtest -> 4.0

Is this a bug ?

If this is not a bug, I apologize for the waste of time. 

If this is a bug we could solve it easily by giving a higher ranking to the internal packages of the new bundle when creating the wire (e.g. this would create a 4.1 -> com.bugtest -> 4.1).
Note : doing "stop" then "update" then "refresh" then "start" avoids the problem because in such case the old module is garbaged out.
I have some bundles that reproduce this ; available via email at sylvainmarie2 - at - yahoo.fr .

Cheers

Sylvain

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


Re: [jira] Created: (FELIX-758) Updated version of a module imports its old version's packages

Posted by Karl Pauls <ka...@gmail.com>.
It's not a bug. Have a look at the FAQ to see why.

http://felix.apache.org/site/apache-felix-osgi-faq.html#ApacheFelixOSGiFAQ-WhenIupdatemybundle%252Cwhyaremybundle%2527soldclassesstillbeingused%253F

regards,

Karl

On Fri, Oct 10, 2008 at 12:08 PM, Sylvain MARIE (JIRA) <ji...@apache.org> wrote:
> Updated version of a module imports its old version's packages
> --------------------------------------------------------------
>
>                 Key: FELIX-758
>                 URL: https://issues.apache.org/jira/browse/FELIX-758
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Sylvain MARIE
>            Priority: Minor
>
>
> Hi all,
>
> In the OSGi specification R4.0.1,
> "An updated bundle must directly provide its exported packages to the system.
> At the same time, packages exported by the previous version continue
> to be available, for existing and future bundles, until the refreshPackages
> method has been called or the Framework is restarted."
>
> It is not clear if the new version of the bundle has the right to import packages from its old version before the refresh is done. Anyway in Felix this happens: in certain cases the resolver creates wires such as
>
> WIRE: 4.1 -> com.bugtest -> 4.0
>
> Is this a bug ?
>
> If this is not a bug, I apologize for the waste of time.
>
> If this is a bug we could solve it easily by giving a higher ranking to the internal packages of the new bundle when creating the wire (e.g. this would create a 4.1 -> com.bugtest -> 4.1).
> Note : doing "stop" then "update" then "refresh" then "start" avoids the problem because in such case the old module is garbaged out.
> I have some bundles that reproduce this ; available via email at sylvainmarie2 - at - yahoo.fr .
>
> Cheers
>
> Sylvain
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>



-- 
Karl Pauls
karlpauls@gmail.com

[jira] Closed: (FELIX-758) Updated version of a module imports its old version's packages

Posted by "Sylvain MARIE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain MARIE closed FELIX-758.
-------------------------------


> Updated version of a module imports its old version's packages
> --------------------------------------------------------------
>
>                 Key: FELIX-758
>                 URL: https://issues.apache.org/jira/browse/FELIX-758
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Sylvain MARIE
>            Priority: Minor
>
> Hi all,
> In the OSGi specification R4.0.1, 
> "An updated bundle must directly provide its exported packages to the system.
> At the same time, packages exported by the previous version continue
> to be available, for existing and future bundles, until the refreshPackages
> method has been called or the Framework is restarted."
> It is not clear if the new version of the bundle has the right to import packages from its old version before the refresh is done. Anyway in Felix this happens: in certain cases the resolver creates wires such as 
> WIRE: 4.1 -> com.bugtest -> 4.0
> Is this a bug ?
> If this is not a bug, I apologize for the waste of time. 
> If this is a bug we could solve it easily by giving a higher ranking to the internal packages of the new bundle when creating the wire (e.g. this would create a 4.1 -> com.bugtest -> 4.1).
> Note : doing "stop" then "update" then "refresh" then "start" avoids the problem because in such case the old module is garbaged out.
> I have some bundles that reproduce this ; available via email at sylvainmarie2 - at - yahoo.fr .
> Cheers
> Sylvain

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


[jira] Commented: (FELIX-758) Updated version of a module imports its old version's packages

Posted by "Sylvain MARIE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638563#action_12638563 ] 

Sylvain MARIE commented on FELIX-758:
-------------------------------------

Thank you Rick, I understand your point. 
I guess I will have to better package my exported interfaces in order not to get this ugly linkage exception then.

> Issue now closed.

> Updated version of a module imports its old version's packages
> --------------------------------------------------------------
>
>                 Key: FELIX-758
>                 URL: https://issues.apache.org/jira/browse/FELIX-758
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Sylvain MARIE
>            Priority: Minor
>
> Hi all,
> In the OSGi specification R4.0.1, 
> "An updated bundle must directly provide its exported packages to the system.
> At the same time, packages exported by the previous version continue
> to be available, for existing and future bundles, until the refreshPackages
> method has been called or the Framework is restarted."
> It is not clear if the new version of the bundle has the right to import packages from its old version before the refresh is done. Anyway in Felix this happens: in certain cases the resolver creates wires such as 
> WIRE: 4.1 -> com.bugtest -> 4.0
> Is this a bug ?
> If this is not a bug, I apologize for the waste of time. 
> If this is a bug we could solve it easily by giving a higher ranking to the internal packages of the new bundle when creating the wire (e.g. this would create a 4.1 -> com.bugtest -> 4.1).
> Note : doing "stop" then "update" then "refresh" then "start" avoids the problem because in such case the old module is garbaged out.
> I have some bundles that reproduce this ; available via email at sylvainmarie2 - at - yahoo.fr .
> Cheers
> Sylvain

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


[jira] Resolved: (FELIX-758) Updated version of a module imports its old version's packages

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-758.
-----------------------------------

    Resolution: Invalid

There is some discussion around this issue within CPEG and it is not 100% clear what the answer is. It is my opinion that the old packages are available for bundles to use. Specifically in this case, if a bundle were updated to fix a bug, even if it didn't change its exported service packages, it would be forced to wire to its new packages, thus requiring a refresh every time it was updating or forcing people to always package their service interfaces separately. To me, this doesn't seem like a good thing.

So, in short, that is the answer for now, although it may change. Not very satisfying perhaps, but please close this issue unless you have more questions.

> Updated version of a module imports its old version's packages
> --------------------------------------------------------------
>
>                 Key: FELIX-758
>                 URL: https://issues.apache.org/jira/browse/FELIX-758
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Sylvain MARIE
>            Priority: Minor
>
> Hi all,
> In the OSGi specification R4.0.1, 
> "An updated bundle must directly provide its exported packages to the system.
> At the same time, packages exported by the previous version continue
> to be available, for existing and future bundles, until the refreshPackages
> method has been called or the Framework is restarted."
> It is not clear if the new version of the bundle has the right to import packages from its old version before the refresh is done. Anyway in Felix this happens: in certain cases the resolver creates wires such as 
> WIRE: 4.1 -> com.bugtest -> 4.0
> Is this a bug ?
> If this is not a bug, I apologize for the waste of time. 
> If this is a bug we could solve it easily by giving a higher ranking to the internal packages of the new bundle when creating the wire (e.g. this would create a 4.1 -> com.bugtest -> 4.1).
> Note : doing "stop" then "update" then "refresh" then "start" avoids the problem because in such case the old module is garbaged out.
> I have some bundles that reproduce this ; available via email at sylvainmarie2 - at - yahoo.fr .
> Cheers
> Sylvain

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


[jira] Commented: (FELIX-758) Updated version of a module imports its old version's packages

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638559#action_12638559 ] 

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

Actually, we did put this into the R4.1 spec in section 4.3.10, where it explicitly states that the packages are available for future resolves. However, I will warn that this is still a discussion topic. I am pushing for the current interpretation.

> Updated version of a module imports its old version's packages
> --------------------------------------------------------------
>
>                 Key: FELIX-758
>                 URL: https://issues.apache.org/jira/browse/FELIX-758
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Sylvain MARIE
>            Priority: Minor
>
> Hi all,
> In the OSGi specification R4.0.1, 
> "An updated bundle must directly provide its exported packages to the system.
> At the same time, packages exported by the previous version continue
> to be available, for existing and future bundles, until the refreshPackages
> method has been called or the Framework is restarted."
> It is not clear if the new version of the bundle has the right to import packages from its old version before the refresh is done. Anyway in Felix this happens: in certain cases the resolver creates wires such as 
> WIRE: 4.1 -> com.bugtest -> 4.0
> Is this a bug ?
> If this is not a bug, I apologize for the waste of time. 
> If this is a bug we could solve it easily by giving a higher ranking to the internal packages of the new bundle when creating the wire (e.g. this would create a 4.1 -> com.bugtest -> 4.1).
> Note : doing "stop" then "update" then "refresh" then "start" avoids the problem because in such case the old module is garbaged out.
> I have some bundles that reproduce this ; available via email at sylvainmarie2 - at - yahoo.fr .
> Cheers
> Sylvain

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