I have a use case where the wiring is a bit complicated.
Karaf uses the felix resolver to compute the full wiring and then applies
it.
At this point, all the bundles are resolved and started correctly.
If Karaf is restarted, the framework restarts and resolves the bundles on
its own, using a bad solution (because the resolver is not greedy) which
leaves some bundles in a non resolvable state (i.e. without refreshing some
bundles).
At this point, I've tried to have Karaf stores the computed wiring so that
it can be re-applied when restarting.  Unfortunately, in my very case, the
wiring is done in such a way that nearly all bundles needs to be refreshed,
even the one containing the bundle hook, so that's bound to deadlocks and
various problems.

I'm left with two solutions :
  * implement a framework extension to minimize the chances to have to
refresh the bundle containing the resolver hook
  * implement a persistent resolution in felix

I don't mind either way, but I wonder if instead of implementing it in
Karaf, it could be done in the framework in a slightly more robust way
(i.e. not contained in a bundle which itself is bound to refreshes, etc...)
and may be reused by others.

Thoughts ?

Guillaume

-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: [email protected]
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Reply via email to