| <html><head> |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <title>13.2 Configuring Framework Extensions and Fragments on the System Bundle</title><link rel="stylesheet" href="css/stylesheet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="Virgo User Guide"><link rel="up" href="ch13.html" title="13. Configuration"><link rel="prev" href="ch13.html" title="13. Configuration"><link rel="next" href="ch13s03.html" title="13.3 Configuring Serviceability and Diagnostics"><!--Begin Google Analytics code--><script type="text/javascript"> |
| var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); |
| document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); |
| </script><script type="text/javascript"> |
| var pageTracker = _gat._getTracker("UA-2728886-3"); |
| pageTracker._setDomainName("none"); |
| pageTracker._setAllowLinker(true); |
| pageTracker._trackPageview(); |
| </script><!--End Google Analytics code--></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">13.2 Configuring Framework Extensions and Fragments on the System Bundle</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch13.html">Prev</a> </td><th width="60%" align="center">13. Configuration</th><td width="20%" align="right"> <a accesskey="n" href="ch13s03.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="configuring-framework-extensions"></a>13.2 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>1.0.0</em></span> and filename: <span class="emphasis"><em>testFragmentBinary_1.0.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,1.0.0,plugins/testFragmentBinary_1.0.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><!--Begin LoopFuse code--><script src="http://loopfuse.net/webrecorder/js/listen.js" type="text/javascript"></script><script type="text/javascript"> |
| _lf_cid = "LF_48be82fa"; |
| _lf_remora(); |
| </script><!--End LoopFuse code--><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch13.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch13.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch13s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">13. Configuration </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 13.3 Configuring Serviceability and Diagnostics</td></tr></table></div></body></html> |