11.9 Configuring framework extensions and fragments on the system bundle
Prev | 11. Configuration | Next

## 11.9 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 VTS. This is because by refreshing or uninstalling them the system.bundle is also refreshed, leading to server crash.

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

Generally its 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 system bundle.

Here's how to configure that in several steps without bringing instability to your VTS:

1. Place your fragment bundle in the `/lib/kernel` directory of your VTS 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 last 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.8 Configuring the OSGi Framework | Home | Appendix A. Event log codes