Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are a couple of things you should do:</p> <ol> <li><p>Make sure you have one bundle (the "management agent" as it is often called in the spec) that starts first on framework (re)starts by giving it a lower start level than all your other bundles. Also make sure you tell the system to start with a start level equal to that of the management agent. That way this bundle will be able to update all other bundles in the framework before they actually get started. Only after the management agent is done updating will it refresh all packages and go to the next start level, effectively starting all other bundles.</p></li> <li><p>To update the management agent, the best way is to temporarily install a second bundle that actually performs the update. Spawning threads within the management agent is not the best solution, as those threads should not keep running once the bundle is stopped and not complying with that might give you problems that are hard to solve. That second bundle will actually update and maybe even rollback if the update fails.</p></li> </ol> <p>An example of a management agent that can update itself can be found as part of the Apache ACE. It has an agent that will, from code, install a second bundle to update itself from a remote location. Some pointers to relevant parts of that project:</p> <ul> <li><a href="http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/AgentUpdateHandlerImpl.java?view=markup" rel="nofollow noreferrer">http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/AgentUpdateHandlerImpl.java?view=markup</a> for the code that installs the temporary bundle</li> <li><a href="http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/updater/Activator.java?view=markup" rel="nofollow noreferrer">http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/updater/Activator.java?view=markup</a> for the activator of the temporary bundle</li> <li><a href="http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/" rel="nofollow noreferrer">http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/</a> for the bnd project of the agent itself</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload