13.2 Configuring Framework Extensions and Fragments on the System Bundle

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.

NOTE: This only applies for fragments on the system bundle. All other fragment bundles have no deployment restrictions.

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.

You can configure framework extensions and system bundle fragments as follows:

1. Place your fragment bundle in the /plugins directory of your Virgo installation.

Lets say we have bundle with

symbolic name: testFragment, version: 1.0.0 and filename: testFragmentBinary_1.0.0.jar

2. Configure the bundles.info file in /configuration/org.eclipse.equinox.simpleconfigurator to include the just copied fragment or framework extension bundle.

Add a line at the end of the bundles.info file similar to this one:


3. Configure the org.eclipse.virgo.kernel.userregion.properties file in /configuration folder to import the fragment bundle or framework extension in the User Region.

Add to the bundleImports property a new line describing the fragment bundle using its symbolic name and version.

bundleImports = org.eclipse.osgi;bundle-version="0",testFragment;bundle-version="0"