13. Configuration
Prev |  | Next

## 13. Configuration

You use configuration files in the `$SERVER_HOME/configuration` directory to configure Virgo. You can also configure the OSGi framework using files the same `$SERVER_HOME/configuration` directory. This section divides the configuration of the server into the following high-level tasks:

- Configuring the OSGi framework

- Configuring framework extensions and fragments on the system bundle

- Configuring serviceability

- Configuring the local provisioning repository

- Configuring the hosted repository

- Configuring the kernel and User Region

- Configuring the embedded Tomcat servlet container

- Configuring the web integration layer

- Configuring the embedded Jetty servlet container

| Why is there both a config and a configuration directory?
The config directory has always contained Virgo configuration files. When Virgo Nano and its support for p2 provisioning was introduced in Virgo 3.5.0, a configuration directory replaced the old config one. Now all Virgo configurations are assembled in that directory providing a single point of configuration. The directory name configuration in the installation's root is used by default in p2 to configure the OSGi framework during provisioning. This chapter makes it clear which configuration goes in each directory.

| Note
Sections 4-6 and 8-9 does not apply for Virgo Nano.

## 13.1 Configuring the OSGi Framework

This section provides information about configuring the OSGi framework by updating the following files in the `$SERVER_HOME/configuration` directory:

Table 13.1. OSGi Framework Configuration Files

Property File | Description | Location
--- | --- | ---
`config.ini` | Configures OSGi framework properties. | $SERVER_HOME/configuration
`bundles.info` | Configures OSGi framework bundles. | $SERVER_HOME/configuration/org.eclipse.equinox.simpleconfigurator
`java6-server.profile` | Configures the OSGi framework profile. | $SERVER_HOME/configuration

### Configuring OSGi Framework Properties

You specify the framework properties in the `$SERVER_HOME/configuration/config.ini` file. The properties most relevant to users are described in the following table.

WARNING: We strongly recommend that you update only the properties below; updating other properties could cause Virgo to fail.

Table 13.2. Framework Properties

Property | Description
--- | ---
`org.eclipse.virgo.kernel.startup.wait.limit` | Specifies the amount of time, in seconds, after which various operations time out out while trying to start the kernel. The default value is 180.
`org.eclipse.virgo.suppress.heap.dumps` | Set to 'false' by default this property will prevent heap dumps being contributed to dumps taken during a First Failure Data Capture (FFDC) event. When the heap dumps are produced they will be located along with the other dump artifacts in the `$SERVER_HOME/serviceability/dump/` folder.
`osgi.java.profile` | Specifies the profile to use using a `file:` URI with default value `file:configuration/java6-server.profile`.
`osgi.bundlefile.limit` | Specifies a limit on the number of jar files the framework will keep open. The minimum value allowed is 10. Any value less than 10 will disable the bundle file limit, making the the number of jar files the framework keeps open unlimited. By default the value is 100. Increase the default value if you have many jar files in the bundle class path, expect a lot of file system operations etc.

### Configuring OSGi Framework Bundles

You specify the framework bundles in the `$SERVER_HOME/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info` file. The syntax that is accepted for listing bundles there is:

    <bsn>,<version>,<jar-location>,<start-level>,<toStart?>
    bsn - the bundle's symbolic name string
    version - the bundle's version string
    jar-location - relative or absolute path to the jar file
    start-level - a digit indicating the bundle's start level
    toStart? - true or false value indicating whether a bundle should be started or not

Here's an example:

    org.eclipse.virgo.util.osgi,3.1.0.BUILD-20111031165127,plugins/org.eclipse.virgo.util.osgi_3.1.0.BUILD-20111031165127.jar,4,true

WARNING: We strongly recommend that you don't remove bundles already present in your bundles.info file as that may break your server. Add bundles here only if absolutely necessary.

### Configuring OSGi Framework Profile

You specify the framework profile in the `$SERVER_HOME/configuration/java6-server.profile` file. The properties most relevant to users are described in the following table.

WARNING: We advise you not to change the framework profile unless you are sure you know exactly what you are doing; updating the profile could cause Virgo to fail.

Table 13.3. Framework Profile Properties

Property | Description
--- | ---
`org.osgi.framework.bootdelegation` | This property specifies the packages which are loaded by delegation to the application class loader. Bundles can load classes belonging to these packages without importing the packages. The `.*` wildcard matches any package suffix. `java.*` is always boot delegated and must not be specified in this property. A common reason for adding packages to this property is to run Virgo under a performance profiler.
`org.osgi.framework.system.packages` | This property specifies the packages which are exported by the system bundle. Although the system bundle is typically imported into the User Region, any additional packages will not be visible in the User Region unless you also import them using the `packagedImports` property. See Configuring the User Region for instructions. It is very occasionally necessary to extend the set, for example when configuring email logging appenders since the implementation of `javax.mail` is intimately related to the implementation of `javax.activation`. To make the corresponding classes available for loading, the relevant JAR file(s) should be placed in `$SERVER_HOME/lib` so that they will be added to the application class path.

Prev |  | Next
12.2 Undeploying Artifacts | Home | 13.2 Configuring Framework Extensions and Fragments on the System Bundle