title: Seeking guidance on using Blueprint to programmatically access info on state of ServiceMix bundles
body: <p>We are running <a href="http://servicemix.apache.org/" rel="nofollow">Apache ServiceMix 4 ESB</a> which runs an <a href="http://karaf.apache.org/" rel="nofollow">Apache Karaf</a> container based on <a href="http://en.wikipedia.org/wiki/OSGi" rel="nofollow">OSGi</a>. OSGi offers facilities, which are exposed in the ServiceMix console, that report information on the <a href="http://servicemix.apache.org/docs/4.4.0/quickstart/console.html" rel="nofollow">state of bundles installed in the container</a>: </p>
  
  <pre><code>osgi:list
  </code></pre>
  
  <p>I've searched high and low. Now I'm asking: Does anyone know of any working examples, guides on using the API or other guidance in accessing this information from within code running in the ESB? Ideally, I would like to: </p>
  
  <ol>
  <li>Identify which bundles are installed; </li>
  <li>Monitor the state of the identified bundle; and, at least,</li>
  <li>Dynamically stop/uninstall and start/re-install the identified bundle, </li>
  </ol>
  
  <p>Please share any information available on this, or just any avenues from which to start better researching it. </p>
  
  <p>Thanks.</p>