I guess what we could do (that may help) would be to wait for the
refresh to finish before returning from the uninstall command.
The problem you see is that packages are refreshed, but this happens
asynchronously iirc and during that time, other calls for changing
bundles state may be blocked and timeout.
If a timeout occurs, I think you'd have those messages in Equinox.
I've just raised https://issues.apache.org/jira/browse/KARAF-358 for that.

On Thu, Jan 6, 2011 at 20:01, boday <[email protected]> wrote:
>
> update on this...probably better suited for karaf/felix forum, but I wanted
> to follow up...
>
> The issues is with running back-to-back "features:uninstall" commands for
> dependent features.  OSGi responds back with "State change in progress...",
> but by accepting other requests, we run into issues.
>
> Strangely, this results in successful feature uninstalls, but unsuccessful
> bundle uninstalls.  We are addressing this by trying to order uninstall
> requests appropriately and adding a delay between steps, but I'm hoping for
> a more robust solution.
>
> I also tried adding "osgi:refresh" in between steps...same behavior.  Is
> there another way to detect that "Refresh Packages" is still running to
> delay subsequent requests, etc?
>
> Here are the details...
>
> ka...@root> features:uninstall PolicyUtil
> ka...@root> features:uninstall Policy1
> ka...@root> features:uninstall Policy2
> State change in progress for bundle "file:/policy2.jar" by thread "Refresh
> Packages".
> ka...@root> features:uninstall Policy3
> State change in progress for bundle "file:/policy3.jar" by thread "Refresh
> Packages".
> ka...@root> features:uninstall Policy4
> ka...@root> features:uninstall Enabler1
> State change in progress for bundle "file:/enabler1.jar" by thread "Refresh
> Packages".
> ka...@root> features:uninstall Enabler2
> State change in progress for bundle "file:/enabler2.jar" by thread "Refresh
> Packages".
>
> afterwards...we end up with features uninstalled (correct), but some bundles
> still installed (incorrect)
>
> osgi:list
>
> [ 277] [Installed  ] [            ] [       ] [   60] Policy2
> [ 278] [Installed  ] [            ] [       ] [   60] Policy3
> [ 280] [Installed  ] [            ] [       ] [   60] Enabler1
> [ 281] [Installed  ] [            ] [       ] [   60] Enabler2
>
> features:list
>
> [uninstalled] [1.0                 ] PolicyUtil
> repo-0
> [uninstalled] [1.0                 ] Policy1                             
> repo-0
> [uninstalled] [1.0                 ] Policy2                             
> repo-0
> [uninstalled] [1.0                 ] Policy3                             
> repo-0
> [uninstalled] [1.0                 ] Enabler1
> repo-0
> [uninstalled] [1.0                 ] Enabler2
> repo-0
>
> Also, I posted this on Stackoverflow as well...
>
> http://stackoverflow.com/questions/4540414/osgi-feature-uninstall-works-but-bundles-are-still-installed
>
> thanks...
>
>
> -----
> Ben O'Day
> --
> View this message in context: 
> http://servicemix.396122.n5.nabble.com/OSGi-bunle-uninstall-requests-failing-periodically-tp3319714p3330947.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to