Update OSGi bundle while starting -


i have several osgi bundles, each of can updated osgi bundle repository. when start osgi framework (apache felix), want first bundle start , check updates installed bundles. if updates available, should update each of them (including itself) continue starting (or possibly shutdown, , os restart app).

how best done in osgi compliant manner?

how should first bundle update itself? can update while starting?

there couple of things should do:

  1. make sure have 1 bundle (the "management agent" called in spec) starts first on framework (re)starts giving lower start level other bundles. make sure tell system start start level equal of management agent. way bundle able update other bundles in framework before started. after management agent done updating refresh packages , go next start level, starting other bundles.

  2. to update management agent, best way temporarily install second bundle performs update. spawning threads within management agent not best solution, threads should not keep running once bundle stopped , not complying might give problems hard solve. second bundle update , maybe rollback if update fails.

an example of management agent can update can found part of apache ace. has agent will, code, install second bundle update remote location. pointers relevant parts of project:


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -