You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Dan Gravell (JIRA)" <ji...@apache.org> on 2012/06/20 18:34:43 UTC

[jira] [Created] (FELIX-3566) OBR should perform a refreshPackages after deploy

Dan Gravell created FELIX-3566:
----------------------------------

             Summary: OBR should perform a refreshPackages after deploy
                 Key: FELIX-3566
                 URL: https://issues.apache.org/jira/browse/FELIX-3566
             Project: Felix
          Issue Type: Bug
          Components: Bundle Repository (OBR)
    Affects Versions: bundlerepository-1.6.6
            Reporter: Dan Gravell
            Priority: Minor


After invoking deploy() in a Resolver, perhaps the OBR should perform a refreshPackages so that the OSGi runtime clears out any old, un-needed bundles.

--
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] [Updated] (FELIX-3566) OBR should perform a refreshPackages after deploy

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

Dan Gravell updated FELIX-3566:
-------------------------------

    Issue Type: Improvement  (was: Bug)
    
> OBR should perform a refreshPackages after deploy
> -------------------------------------------------
>
>                 Key: FELIX-3566
>                 URL: https://issues.apache.org/jira/browse/FELIX-3566
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.6.6
>            Reporter: Dan Gravell
>            Priority: Minor
>
> After invoking deploy() in a Resolver, perhaps the OBR should perform a refreshPackages so that the OSGi runtime clears out any old, un-needed bundles.

--
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-3566) OBR should perform a refreshPackages after deploy

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

Guillaume Nodet commented on FELIX-3566:
----------------------------------------

My point is that the user should be in control of *when* the refresh is done.  I agree it will have to be done, but for some reason, the user may want to deploy some bundles directly, then through OBR or whatever and perform a refresh at the end.  Multiple refresh will just cause more problems.
I'm not sure about the default, it's like saying that updating a bundle should cause a refresh by default, but either case sound ok to me.
                
> OBR should perform a refreshPackages after deploy
> -------------------------------------------------
>
>                 Key: FELIX-3566
>                 URL: https://issues.apache.org/jira/browse/FELIX-3566
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.6.6
>            Reporter: Dan Gravell
>            Priority: Minor
>
> After invoking deploy() in a Resolver, perhaps the OBR should perform a refreshPackages so that the OSGi runtime clears out any old, un-needed bundles.

--
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-3566) OBR should perform a refreshPackages after deploy

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

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

Probably, for legacy reasons. But in reality, it should be the default. We automatically will update bundles if they can be updated, but then we leave them in a non-refreshed state, which invariably can cause problems if bundles don't explicitly import what they export and/or have dependencies between exported packages and private packages. Probably my fault way back when for not thinking about that.

We could easily implement this as a flag to deploy; however, my recommendation is that it would be enabled by default and you have to specifically disable it if you don't want it. This may cause some issues with some clients, but I'd expect it would help more than hurt.
                
> OBR should perform a refreshPackages after deploy
> -------------------------------------------------
>
>                 Key: FELIX-3566
>                 URL: https://issues.apache.org/jira/browse/FELIX-3566
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.6.6
>            Reporter: Dan Gravell
>            Priority: Minor
>
> After invoking deploy() in a Resolver, perhaps the OBR should perform a refreshPackages so that the OSGi runtime clears out any old, un-needed bundles.

--
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-3566) OBR should perform a refreshPackages after deploy

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

Dan Gravell commented on FELIX-3566:
------------------------------------

Not sure who should be reviewing it (!) but from a functional point of view that looks good. It saves me a bit of code anyway.

>From a code point of view, it might be best to make sure line wrapping settings are the same, as localResource.getBundle().update[...] line is now wrapped. Might just be me but I don't like checking changes in that are immaterial...

Also, you could inline:

Bundle[] bundles = (Bundle[]) refreshList.toArray(new Bundle[refreshList.size()]);

As bundles isn't used elsewhere in that scope. Maybe you meant to add them to the log(Logger.LOG_WARNING, [...]) ? Might be useful.
                
> OBR should perform a refreshPackages after deploy
> -------------------------------------------------
>
>                 Key: FELIX-3566
>                 URL: https://issues.apache.org/jira/browse/FELIX-3566
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.6.6
>            Reporter: Dan Gravell
>            Priority: Minor
>         Attachments: FELIX-3566.txt
>
>
> After invoking deploy() in a Resolver, perhaps the OBR should perform a refreshPackages so that the OSGi runtime clears out any old, un-needed bundles.

--
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-3566) OBR should perform a refreshPackages after deploy

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

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

Agreed about letting the user be in control.

With regards to default, I've had this argument with Peter Kriens numerous times, although I was generally on the opposite side of the argument. Peter feels the framework is in an inconsistent state after an update and that a refresh needs to be performed at some point to get it back to a consistent state. I don't agree with that sentiment, but I accept that it requires an expert to understand when it is or isn't ok to refresh.

Thus, as a default, I think it makes more sense to refresh, since that will generally get you back in a reasonable state, even if it ends up refreshing multiple times.
                
> OBR should perform a refreshPackages after deploy
> -------------------------------------------------
>
>                 Key: FELIX-3566
>                 URL: https://issues.apache.org/jira/browse/FELIX-3566
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.6.6
>            Reporter: Dan Gravell
>            Priority: Minor
>
> After invoking deploy() in a Resolver, perhaps the OBR should perform a refreshPackages so that the OSGi runtime clears out any old, un-needed bundles.

--
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-3566) OBR should perform a refreshPackages after deploy

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

Guillaume Nodet commented on FELIX-3566:
----------------------------------------

I think if we were to add a refresh call, it would have to be optional.
                
> OBR should perform a refreshPackages after deploy
> -------------------------------------------------
>
>                 Key: FELIX-3566
>                 URL: https://issues.apache.org/jira/browse/FELIX-3566
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.6.6
>            Reporter: Dan Gravell
>            Priority: Minor
>
> After invoking deploy() in a Resolver, perhaps the OBR should perform a refreshPackages so that the OSGi runtime clears out any old, un-needed bundles.

--
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] [Updated] (FELIX-3566) OBR should perform a refreshPackages after deploy

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

Richard S. Hall updated FELIX-3566:
-----------------------------------

    Attachment: FELIX-3566.txt

The attached patch implements refreshing, which is controllable by a flag to the deploy() method. It refreshes by default. It uses PackageAdmin to be compatible with older frameworks; it also imports PackageAdmin optionally, just in case.

Please review.
                
> OBR should perform a refreshPackages after deploy
> -------------------------------------------------
>
>                 Key: FELIX-3566
>                 URL: https://issues.apache.org/jira/browse/FELIX-3566
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.6.6
>            Reporter: Dan Gravell
>            Priority: Minor
>         Attachments: FELIX-3566.txt
>
>
> After invoking deploy() in a Resolver, perhaps the OBR should perform a refreshPackages so that the OSGi runtime clears out any old, un-needed bundles.

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