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] Resolved: (FELIX-1851) FileInstall watched bundles are restarted twice upon update
Date Wed, 16 Dec 2009 12:17:18 GMT

     [ https://issues.apache.org/jira/browse/FELIX-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Guillaume Nodet resolved FELIX-1851.

       Resolution: Fixed
    Fix Version/s: fileinstall-2.0.6
         Assignee: Guillaume Nodet

Sending        fileinstall/pom.xml
Sending        fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
Transmitting file data ..
Committed revision 891210.

> FileInstall watched bundles are restarted twice upon update
> -----------------------------------------------------------
>                 Key: FELIX-1851
>                 URL: https://issues.apache.org/jira/browse/FELIX-1851
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Guillaume Nodet
>             Fix For: fileinstall-2.0.6
> I am observing that bundles watched by fileinstall (1.2.0) are getting stopped &
subsequently started twice when they are updated. First time, they are stopped and started
by a call to update() and then because of a call to refreshPackages(). The scenario where
this is happening is given below:
> bundle A exports package p and is tracking service of type p.Foo.
> bundle B imports a package p from A. It exports a service object with the service interface
> I am updating bundle A and it is getting stopped and started twice.
> The explanation given to me (thanks to Richard) is that:
> "The update operation is defined as first stopping a bundle and restarting it after the
update. This is once.
> Since an updated bundle is not really updated until it is refreshed, when you refresh,
bundle A's update is finalized by being refreshed, which causes it to stop and restart. This
is twice. 
> ...
> If bundle A was not being used, Felix would optimize this and do the refresh as part
of the update, so it would only happen once.
> If File Install always refreshes after an update, it would be better to change it to
first stop all bundles being updated, then update all bundles, then refresh, then restart
all updated bundles. This way they would only stop/restart once."
> I am not sure if the behavior has changed in newer version of fileinstall or not. If
not, this will be a good change to make.

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

View raw message