blob: 60c6e09356811bf787428b2cf7f3aad556fa2ad1 [file] [log] [blame]
<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter&nbsp;13.&nbsp;Configuration</title><meta content="DocBook XSL Stylesheets V1.76.0" name="generator"><link rel="home" href="index.html" title="Virgo User Guide"><link rel="up" href="index.html" title="Virgo User Guide"><link rel="prev" href="ch12s02.html" title="Undeploying Artifacts"><link rel="next" href="ch13s02.html" title="Configuring Framework Extensions and Fragments on the System Bundle"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><td align="left" width="20%"><a accesskey="p" href="ch12s02.html">Prev</a>&nbsp;</td><th align="center" width="60%">&nbsp;</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="ch13s02.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter&nbsp;13.&nbsp;Configuration"><div class="titlepage"><div><div><h2 class="title"><a name="configuring"></a>Chapter&nbsp;13.&nbsp;Configuration</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch13.html#configuring-osgi-framework">Configuring the OSGi Framework</a></span></dt><dd><dl><dt><span class="section"><a href="ch13.html#configuring-framework-properties">Configuring OSGi Framework Properties</a></span></dt><dt><span class="section"><a href="ch13.html#configuring-framework-bundles">Configuring OSGi Framework Bundles</a></span></dt><dt><span class="section"><a href="ch13.html#configuring-framework-profile">Configuring OSGi Framework Profile</a></span></dt></dl></dd><dt><span class="section"><a href="ch13s02.html">Configuring Framework Extensions and Fragments on the System Bundle</a></span></dt><dt><span class="section"><a href="ch13s03.html">Configuring Serviceability and Diagnostics</a></span></dt><dd><dl><dt><span class="section"><a href="ch13s03.html#configuring-serviceability-medic">The org.eclipse.virgo.medic.properties File</a></span></dt><dt><span class="section"><a href="ch13s03.html#configuring-serviceability-logback">The serviceability.xml File</a></span></dt></dl></dd><dt><span class="section"><a href="ch13s04.html">Configuring the Local Provisioning Repository</a></span></dt><dd><dl><dt><span class="section"><a href="ch13s04.html#configuring-repository-watched-versus-external">Should I Configure a Watched or External Repository?</a></span></dt><dt><span class="section"><a href="ch13s04.html#configuring-provisioning-repository-search-paths">Search Paths: Additional Information</a></span></dt><dt><span class="section"><a href="ch13s04.html#configuring-provisioning-repository-using-system-properties">Using System Properties</a></span></dt><dt><span class="section"><a href="ch13s04.html#configuring-provisioning-repository-examples">Example Repository Configurations</a></span></dt></dl></dd><dt><span class="section"><a href="ch13s05.html">Configuring a Hosted Repository</a></span></dt><dt><span class="section"><a href="ch13s06.html">Configuring the Kernel and User Region</a></span></dt><dd><dl><dt><span class="section"><a href="ch13s06.html#configuring-kernel-properties">Configuring the Kernel</a></span></dt><dt><span class="section"><a href="ch13s06.html#configuring-kernel-files">Configuration Files</a></span></dt><dt><span class="section"><a href="ch13s06.html#configuring-deployment">Configuring Deployment</a></span></dt><dt><span class="section"><a href="ch13s06.html#configuring-user-region">Configuring the User Region</a></span></dt><dt><span class="section"><a href="ch13s06.html#configuring-authentication">Configuring Authentication</a></span></dt></dl></dd><dt><span class="section"><a href="ch13s07.html">Configuring the Embedded Tomcat Servlet Container</a></span></dt><dd><dl><dt><span class="section"><a href="ch13s07.html#overview-tomcat-servlet-container">Description of the Default Apache Tomcat Configuration</a></span></dt><dt><span class="section"><a href="ch13s07.html#configuring-tomcat-connectors">Connector Configuration</a></span></dt><dt><span class="section"><a href="ch13s07.html#configuring-tomcat-clustering">Cluster Configuration</a></span></dt><dt><span class="section"><a href="ch13s07.html#configuring-tomcat-contexts">Context Configuration</a></span></dt></dl></dd><dt><span class="section"><a href="ch13s08.html">Configuring the Web Integration Layer</a></span></dt><dt><span class="section"><a href="ch13s09.html">Configuring the Embedded Jetty Servlet Container</a></span></dt></dl></div><p>You use configuration files in the <code class="literal">$SERVER_HOME/configuration</code> directory to configure Virgo. You can also configure the OSGi framework using files the same <code class="literal">$SERVER_HOME/configuration</code> directory. This section divides the configuration of the server into the following high-level tasks:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><a class="link" href="ch13.html#configuring-osgi-framework" title="Configuring the OSGi Framework">Configuring the OSGi framework</a></p></li><li class="listitem"><p><a class="link" href="ch13s02.html" title="Configuring Framework Extensions and Fragments on the System Bundle">Configuring framework extensions and fragments on the system bundle</a></p></li><li class="listitem"><p><a class="link" href="ch13s03.html" title="Configuring Serviceability and Diagnostics">Configuring serviceability</a></p></li><li class="listitem"><p><a class="link" href="ch13s04.html" title="Configuring the Local Provisioning Repository">Configuring the local provisioning repository</a></p></li><li class="listitem"><p><a class="link" href="ch13s05.html" title="Configuring a Hosted Repository">Configuring the hosted repository</a></p></li><li class="listitem"><p><a class="link" href="ch13s06.html" title="Configuring the Kernel and User Region">Configuring the kernel and User Region</a></p></li><li class="listitem"><p><a class="link" href="ch13s07.html" title="Configuring the Embedded Tomcat Servlet Container">Configuring the embedded Tomcat servlet container</a></p></li><li class="listitem"><p><a class="link" href="ch13s08.html" title="Configuring the Web Integration Layer">Configuring the web integration layer</a></p></li><li class="listitem"><p><a class="link" href="ch13s09.html" title="Configuring the Embedded Jetty Servlet Container">Configuring the embedded Jetty servlet container</a></p></li></ul></div><div class="note" title="Why is there both a config and a configuration directory?" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Why is there both a config and a configuration directory?</h3><p>The <span class="emphasis"><em>config</em></span> directory has always contained Virgo configuration files. When Virgo Nano and its support for p2 provisioning was introduced in Virgo 3.5.0, a <span class="emphasis"><em>configuration</em></span> directory replaced the old <span class="emphasis"><em>config</em></span> one. Now all Virgo configurations are assembled in that directory providing a single point of configuration. The directory name <span class="emphasis"><em>configuration</em></span> in the installation's root is used by default in p2 to configure the OSGi framework during provisioning.</p><p>This chapter makes it clear which configuration goes in each directory.</p></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>Sections 4-6 and 8-9 does not apply for Virgo Nano.</div><div class="section" title="Configuring the OSGi Framework"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="configuring-osgi-framework"></a>Configuring the OSGi Framework</h2></div></div></div><p>
This section provides information about configuring the OSGi framework by updating the following files in the <code class="literal">$SERVER_HOME/configuration</code> directory:
</p><div class="table"><a name="configuring-osgi-framework-table"></a><p class="title"><b>Table&nbsp;13.1.&nbsp;OSGi Framework Configuration Files </b></p><div class="table-contents"><table summary="OSGi Framework Configuration Files " border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Property File</th><th>Description</th><th>Location</th></tr></thead><tbody><tr><td><code class="literal">config.ini</code></td><td>Configures <a class="link" href="ch13.html#configuring-framework-properties" title="Configuring OSGi Framework Properties">OSGi framework properties</a>.</td><td>$SERVER_HOME/configuration</td></tr><tr><td><code class="literal">bundles.info</code></td><td>Configures <a class="link" href="ch13.html#configuring-framework-bundles" title="Configuring OSGi Framework Bundles">OSGi framework bundles</a>.</td><td>$SERVER_HOME/configuration/org.eclipse.equinox.simpleconfigurator</td></tr><tr><td><code class="literal">java6-server.profile</code></td><td>Configures the <a class="link" href="ch13.html#configuring-framework-profile" title="Configuring OSGi Framework Profile">OSGi framework profile</a>.</td><td>$SERVER_HOME/configuration</td></tr></tbody></table></div></div><br class="table-break"><div class="section" title="Configuring OSGi Framework Properties"><div class="titlepage"><div><div><h3 class="title"><a name="configuring-framework-properties"></a>Configuring OSGi Framework Properties</h3></div></div></div><p>
You specify the framework properties in the <code class="literal">$SERVER_HOME/configuration/config.ini</code> file. The
properties most relevant to users are described in the following table.
</p><p>
<span class="bold"><strong>WARNING:</strong></span> We strongly recommend that you update only the
properties below; updating other properties could cause Virgo
to fail.
</p><div class="table"><a name="configuring-framework-properties-table"></a><p class="title"><b>Table&nbsp;13.2.&nbsp;Framework Properties</b></p><div class="table-contents"><table summary="Framework Properties" border="1"><colgroup><col><col></colgroup><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code class="literal">org.eclipse.virgo.kernel.startup.wait.limit</code></td><td>
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.
</td></tr><tr><td><code class="literal">org.eclipse.virgo.suppress.heap.dumps</code></td><td>
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 <code class="literal">$SERVER_HOME/serviceability/dump/</code> folder.
</td></tr><tr><td><code class="literal">osgi.java.profile</code></td><td>
Specifies the profile to use using a <code class="literal">file:</code> URI with default value
<code class="literal">file:configuration/java6-server.profile</code>.
</td></tr></tbody></table></div></div><br class="table-break"></div><div class="section" title="Configuring OSGi Framework Bundles"><div class="titlepage"><div><div><h3 class="title"><a name="configuring-framework-bundles"></a>Configuring OSGi Framework Bundles</h3></div></div></div><p>
You specify the framework bundles in the <code class="literal">$SERVER_HOME/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info</code> file. The syntax
that is accepted for listing bundles there is:
</p><pre class="screen">&lt;bsn&gt;,&lt;version&gt;,&lt;jar-location&gt;,&lt;start-level&gt;,&lt;toStart?&gt;
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</pre><p>
</p><p>Here's an example:</p><p>
</p><pre class="screen">org.eclipse.virgo.util.osgi,3.1.0.BUILD-20111031165127,plugins/org.eclipse.virgo.util.osgi_3.1.0.BUILD-20111031165127.jar,4,true</pre><p>
</p><p>
<span class="bold"><strong>WARNING:</strong></span> 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.
</p></div><div class="section" title="Configuring OSGi Framework Profile"><div class="titlepage"><div><div><h3 class="title"><a name="configuring-framework-profile"></a>Configuring OSGi Framework Profile</h3></div></div></div><p>
You specify the framework profile in the <code class="literal">$SERVER_HOME/configuration/java6-server.profile</code> file. The
properties most relevant to users are described in the following table.
</p><p>
<span class="bold"><strong>WARNING:</strong></span> 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.
</p><div class="table"><a name="configuring-framework-profile-table"></a><p class="title"><b>Table&nbsp;13.3.&nbsp;Framework Profile Properties</b></p><div class="table-contents"><table summary="Framework Profile Properties" border="1"><colgroup><col><col></colgroup><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code class="literal">org.osgi.framework.bootdelegation</code></td><td>
<p>
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 <code class="literal">.*</code> wildcard matches any package suffix. <code class="literal">java.*</code> is always
boot delegated and must not be specified in this property.
</p>
<p>
A common reason for adding packages to this property is to run Virgo under a performance profiler.
</p>
</td></tr><tr><td><code class="literal">org.osgi.framework.system.packages</code></td><td>
<p>
This property specifies the packages which are exported by the system bundle.
</p>
<p>
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 <code class="literal">packagedImports</code> property.
See <a class="link" href="ch13s06.html#configuring-user-region" title="Configuring the User Region">Configuring the User Region</a> for instructions.
</p>
<p>
It is very occasionally necessary to extend the set, for example when configuring email logging appenders since the
implementation of <code class="literal">javax.mail</code> is intimately related to the implementation of
<code class="literal">javax.activation</code>.
</p>
<p>
To make the corresponding classes available for loading, the relevant JAR file(s) should be placed in
<code class="literal">$SERVER_HOME/lib</code> so that they will be added to the application class path.
</p>
</td></tr></tbody></table></div></div><br class="table-break"></div></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="ch12s02.html">Prev</a>&nbsp;</td><td align="center" width="20%">&nbsp;</td><td align="right" width="40%">&nbsp;<a accesskey="n" href="ch13s02.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;</td></tr></table></div></body></html>