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

Thomas Draier commented on FELIX-1851:
--------------------------------------

Hi,

The fix that has been submitted here only works when you have the 
"felix.fileinstall.bundles.new.start" set to true - when auto start is not used 
, I have exactly the same issue - bundle is restarted first by the framework, 
then by the refresh. 
I did a patch to handle this case - can you confirm the patch is correct and 
can be included in a next release ?

Regards,

                
> 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.8
>
>         Attachments: FELIX-1851.patch
>
>
> 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 p.Foo.
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to