| <html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Configuring Framework Extensions and Fragments on the System Bundle</title><meta content="DocBook XSL Stylesheets V1.76.0" name="generator"><link rel="home" href="index.html" title="Virgo User Guide"><link rel="up" href="ch13.html" title="Chapter 13. Configuration"><link rel="prev" href="ch13.html" title="Chapter 13. Configuration"><link rel="next" href="ch13s03.html" title="Configuring Serviceability and Diagnostics"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><td align="left" width="20%"><a accesskey="p" href="ch13.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="ch13s03.html">Next</a></td></tr></table><hr></div><div class="section" title="Configuring Framework Extensions and Fragments on the System Bundle"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="configuring-framework-extensions"></a>Configuring Framework Extensions and Fragments on the System Bundle</h2></div></div></div><p> |
| This section provides information about configuring framework extensions and fragments on the system bundle. Deployment of such bundles is not allowed in |
| Virgo. This is because by refreshing or uninstalling them the system.bundle is also refreshed, which causes Virgo to crash. |
| </p><p> |
| <span class="bold"><strong>NOTE:</strong></span> This only applies for fragments on the system bundle. All other fragment bundles have no deployment restrictions. |
| </p><p> |
| Generally it's best to avoid usage of such fragment bundles as they are a common OSGi framework issue and often require restarting the framework. |
| However sometimes there are no other options and one has to use framework extensions or fragments on the system bundle. |
| </p><p> |
| You can configure framework extensions and system bundle fragments as follows: |
| </p><p> |
| <span class="bold"><strong>1.</strong></span> Place your fragment bundle in the <code class="literal">/plugins</code> directory of your Virgo installation. |
| </p><p> |
| Lets say we have bundle with |
| </p><p> |
| </p><pre class="programlisting"> |
| symbolic name: <span class="emphasis"><em>testFragment</em></span>, version: <span class="emphasis"><em>3.5.0</em></span> and filename: <span class="emphasis"><em>testFragmentBinary_3.5.0.jar</em></span> |
| </pre><p> |
| </p><p> |
| <span class="bold"><strong>2.</strong></span> Configure the <code class="literal">bundles.info</code> file in <code class="literal">/configuration/org.eclipse.equinox.simpleconfigurator</code> to include the |
| just copied fragment or framework extension bundle. |
| </p><p> |
| Add a line at the end of the <code class="literal">bundles.info</code> file similar to this one: |
| </p><p> |
| </p><pre class="programlisting"> |
| <span class="emphasis"><em>testFragment,3.5.0,plugins/testFragmentBinary_3.5.0.jar,4,false</em></span> |
| </pre><p> |
| </p><p> |
| <span class="bold"><strong>3.</strong></span> Configure the <code class="literal">org.eclipse.virgo.kernel.userregion.properties</code> file in <code class="literal">/configuration</code> folder to import the fragment bundle or framework extension in the User Region. |
| </p><p> |
| Add to the <code class="literal">bundleImports</code> property a new line describing the fragment bundle using its symbolic name and version. |
| </p><p> |
| </p><pre class="programlisting"> |
| bundleImports = org.eclipse.osgi;bundle-version="0",<span class="bold"><strong>testFragment;bundle-version="0"</strong></span> |
| </pre><p> |
| </p></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="ch13.html">Prev</a> </td><td align="center" width="20%"><a accesskey="u" href="ch13.html">Up</a></td><td align="right" width="40%"> <a accesskey="n" href="ch13s03.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%"> </td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%"> </td></tr></table></div></body></html> |