java - OSGi Application Patching mechanism -


is there recommended approach patch osgi application on runtime? i'm using equinox implementation of osgi.

if stop particular bundle , install patched bundle. how affect other bundles @ runtime?..

i saw osgi application patching strategy , not give clear answer.

thanks.

i suppose depends on how bundles are.

there example in "osgi in action" book, on page 73.

to try yourself:

  1. download examples,
  2. unpack file , build "chapter03" examples ant (osgi-in-action/chapter03/build.xml),
  3. copy chapter03/paint-example/bundles/*-3.0.jar files e.g. chapter03/shell-example/1,

in order make examples work (see issue) need this:

  1. download latest apache felix framework distribution this page, @ moment it's 4.2.1,
  2. extract org.apache.felix.main.distribution-4.2.1.zip file,
  3. extract felix-framework-4.2.1/bin/felix.jar file,
  4. copy default.properties file osgi example's chapter03/shell-example/launcher.jar.

now have ready:

// in console window #1: $ cd chapter03/shell-example/ $ java -jar launcher.jar bundles  // in console window #2: $ telnet localhost 7070 -> install file:1/paint-3.0.jar -> install file:1/shape-3.0.jar -> start 2 -> install file:1/circle-3.0.jar -> install file:1/square-3.0.jar -> start 4 -> start 5 -> install file:1/triangle-3.0.jar -> start 6 // can draw 3 shapes.  // simulate upgrade/patch of "circle" bundle: -> stop 4 // "work in progress" sign in place of circles. // can still move them.  // start "circle" bundle again , they're in ui: -> start 4 

you can check example source code see how did it. hope answers question.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -