11.2 Configuring Framework Extensions and Fragments on the System Bundle
Prev | 11. Configuration | Next

## 11.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 `/lib/kernel` 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 `org.eclipse.virgo.kernel.launch.properties` file in `/lib` to include the just copied fragment or framework extension bundle.

Add a line at the end of the `launcher.bundles` property similar to this one:

    file:lib/kernel/testFragmentBinary_1.0.0.jar

| Tip
Don't forget to add `,\` at the end of the previous bundle in the `launcher.bundles` list.

3. Configure the `org.eclipse.virgo.kernel.userregion.properties` file in `/config` 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"

Prev | Up | Next
11. Configuration | Home | 11.3 Configuring Serviceability and Diagnostics