Search code examples
javaapacheosgiprovisioning

How to start a target if the ACE server is down


I have the following:

  • an ACE 0.81 server on a machine with all the necessary bundles for a target to start (I mean ALL of them)
  • a target container in another machine with only the managementagent.jar. When the target starts, all its bundles get downloaded from the ACE server.

Problem is that no 'hard copy' of said bundles are made so if I try to start the target container while the ACE server is down, only the management agent starts, but I need the target to start whith the last known bundles.

Is there a way to do this only with configuration or do I need to code something?


Solution

  • An OSGi framework should support a persistent bundle cache. Using this will recover all installed bundles and bundle state on a framework restart. This is enable in Felix by default, so if you are using the ace-launcher for targets this works out of the box.

    For Equinox this is sometimes disabled. There is a property -osgi.clean=false to make sure the bundle cache survives a restart.