You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Sahoo (JIRA)" <ji...@apache.org> on 2012/07/07 11:02:34 UTC

[jira] [Created] (FELIX-3587) Uses constraint violation due to framework extension bundle

Sahoo created FELIX-3587:
----------------------------

             Summary: Uses constraint violation due to framework extension bundle
                 Key: FELIX-3587
                 URL: https://issues.apache.org/jira/browse/FELIX-3587
             Project: Felix
          Issue Type: Bug
          Components: Framework
            Reporter: Sahoo


There seems to be an issue with framework extension bundle and I have not checked the spec yet. Felix allows extension bundle to be attached at runtime, but that can sometimes lead to uses constraint violation if a package exported by the framework extension is also exported by some other regular bundle and that package from regular bundle is in use. A refreshPackages solves the issue, but that seems to be putting the onus on user. Can the framework be smart enough to not attach an extension bundle to host when it sees that an extension is exporting a package which is already in use?


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3587) Uses constraint violation due to framework extension bundle

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

Sahoo commented on FELIX-3587:
------------------------------

Thanks for your comments, Richards. I think a resolver can't always detect the need for a fragment. So, resolving framework extensions eagerly is a desired thing, but it should not always be done. I will try to state my understanding and you can comment on it. This is my understanding: 
Felix does not allow fragments to be attached to regular RESOLVED bundles without requiring the host to be updated for very good reasons. As a special case, it allows system bundle fragments to be attached without requiring the system bundle to be updated so that one can create a framework and install framework extensions and those extensions will take immediate effect. This is a good thing, but it can't always be allowed as it can lead to the kind of issues mentioned in the bug description. So the framework has to be more selective about resolving framework extensions. e.g.:
a) Allow system bundle fragments to be attached only if they are installed when the framework is in STARTING state.
b) Allow system bundle fragments to be attached only if they are exporting packages which are not already in use.

#b is superset of #a, but #b might require more effort to implement.
                
> Uses constraint violation due to framework extension bundle
> -----------------------------------------------------------
>
>                 Key: FELIX-3587
>                 URL: https://issues.apache.org/jira/browse/FELIX-3587
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Sahoo
>
> There seems to be an issue with framework extension bundle and I have not checked the spec yet. Felix allows extension bundle to be attached at runtime, but that can sometimes lead to uses constraint violation if a package exported by the framework extension is also exported by some other regular bundle and that package from regular bundle is in use. A refreshPackages solves the issue, but that seems to be putting the onus on user. Can the framework be smart enough to not attach an extension bundle to host when it sees that an extension is exporting a package which is already in use?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3587) Uses constraint violation due to framework extension bundle

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

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

For system bundle extensions, I'm not sure if there is a case that matters where the resolver won't detect a need for the fragment. Regardless, it makes the most sense to figure out how to run this through the resolver to determine if attaching the fragment is possible since trying to detect it requires knowing something about resolving anyway. All of this is more complicated than what I can think about right now, but I agree that this is a real issue that should ultimately be addressed.
                
> Uses constraint violation due to framework extension bundle
> -----------------------------------------------------------
>
>                 Key: FELIX-3587
>                 URL: https://issues.apache.org/jira/browse/FELIX-3587
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Sahoo
>
> There seems to be an issue with framework extension bundle and I have not checked the spec yet. Felix allows extension bundle to be attached at runtime, but that can sometimes lead to uses constraint violation if a package exported by the framework extension is also exported by some other regular bundle and that package from regular bundle is in use. A refreshPackages solves the issue, but that seems to be putting the onus on user. Can the framework be smart enough to not attach an extension bundle to host when it sees that an extension is exporting a package which is already in use?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3587) Uses constraint violation due to framework extension bundle

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

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

Interesting issue. Yes, it can be smart enough, but it would actually have to run the resolver first. Currently, it special cases framework extensions meaning that they don't run through the resolve process like normal bundles. This would require some thought, but perhaps ultimately what would be the best approach is to simply treat them like normal bundles and don't attach the fragment to the system bundle until the resolver indicates it is needed.
                
> Uses constraint violation due to framework extension bundle
> -----------------------------------------------------------
>
>                 Key: FELIX-3587
>                 URL: https://issues.apache.org/jira/browse/FELIX-3587
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Sahoo
>
> There seems to be an issue with framework extension bundle and I have not checked the spec yet. Felix allows extension bundle to be attached at runtime, but that can sometimes lead to uses constraint violation if a package exported by the framework extension is also exported by some other regular bundle and that package from regular bundle is in use. A refreshPackages solves the issue, but that seems to be putting the onus on user. Can the framework be smart enough to not attach an extension bundle to host when it sees that an extension is exporting a package which is already in use?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira