blob: 184b689adc8d6faa72f1eabd51dd15649e2657bc [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>13.&nbsp;Configuration</title><link rel="stylesheet" href="css/stylesheet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><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="12.2&nbsp;Undeploying Artifacts"><link rel="next" href="ch13s02.html" title="13.2&nbsp;Configuring Framework Extensions and Fragments on the System Bundle"><!--Begin Google Analytics code--><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2728886-3");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
</script><!--End Google Analytics code--></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">13.&nbsp;Configuration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch12s02.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch13s02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="configuring"></a>13.&nbsp;Configuration</h2></div></div></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 type="disc"><li><p><a class="link" href="ch13.html#configuring-osgi-framework" title="13.1&nbsp;Configuring the OSGi Framework">Configuring the OSGi framework</a></p></li><li><p><a class="link" href="ch13s02.html" title="13.2&nbsp;Configuring Framework Extensions and Fragments on the System Bundle">Configuring framework extensions and fragments on the system bundle</a></p></li><li><p><a class="link" href="ch13s03.html" title="13.3&nbsp;Configuring Serviceability and Diagnostics">Configuring serviceability</a></p></li><li><p><a class="link" href="ch13s04.html" title="13.4&nbsp;Configuring the Local Provisioning Repository">Configuring the local provisioning repository</a></p></li><li><p><a class="link" href="ch13s05.html" title="13.5&nbsp;Configuring a Hosted Repository">Configuring the hosted repository</a></p></li><li><p><a class="link" href="ch13s06.html" title="13.6&nbsp;Configuring the Kernel and User Region">Configuring the kernel and User Region</a></p></li><li><p><a class="link" href="ch13s07.html" title="13.7&nbsp;Configuring the Embedded Tomcat Servlet Container">Configuring the embedded Tomcat servlet container</a></p></li><li><p><a class="link" href="ch13s08.html" title="13.8&nbsp;Configuring the Web Integration Layer">Configuring the web integration layer</a></p></li><li><p><a class="link" href="ch13s09.html" title="13.9&nbsp;Configuring the Embedded Jetty Servlet Container">Configuring the embedded Jetty servlet container</a></p></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Why is there both a config and a configuration directory?"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.gif"></td><th align="left">Why is there both a config and a configuration directory?</th></tr><tr><td align="left" valign="top"><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></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.gif"></td><th align="left">Note</th></tr><tr><td align="left" valign="top">Sections 4-6 and 8-9 does not apply for Virgo Nano.</td></tr></table></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="configuring-osgi-framework"></a>13.1&nbsp;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 " style="border-collapse: collapse;border-top: 1.0pt solid ; border-bottom: 1.0pt solid ; border-left: 1.0pt solid ; border-right: 1.0pt solid ; "><colgroup><col><col><col></colgroup><thead><tr><th style="border-right: 1.0pt solid ; border-bottom: 1.0pt solid ; ">Property File</th><th style="border-right: 1.0pt solid ; border-bottom: 1.0pt solid ; ">Description</th><th style="border-bottom: 1.0pt solid ; ">Location</th></tr></thead><tbody><tr><td style="border-right: 1.0pt solid ; border-bottom: 1.0pt solid ; "><code class="literal">config.ini</code></td><td style="border-right: 1.0pt solid ; border-bottom: 1.0pt solid ; ">Configures <a class="link" href="ch13.html#configuring-framework-properties" title="Configuring OSGi Framework Properties">OSGi framework properties</a>.</td><td style="border-bottom: 1.0pt solid ; ">$SERVER_HOME/configuration</td></tr><tr><td style="border-right: 1.0pt solid ; border-bottom: 1.0pt solid ; "><code class="literal">bundles.info</code></td><td style="border-right: 1.0pt solid ; border-bottom: 1.0pt solid ; ">Configures <a class="link" href="ch13.html#configuring-framework-bundles" title="Configuring OSGi Framework Bundles">OSGi framework bundles</a>.</td><td style="border-bottom: 1.0pt solid ; ">$SERVER_HOME/configuration/org.eclipse.equinox.simpleconfigurator</td></tr><tr><td style="border-right: 1.0pt solid ; "><code class="literal">java6-server.profile</code></td><td style="border-right: 1.0pt solid ; ">Configures the <a class="link" href="ch13.html#configuring-framework-profile" title="Configuring OSGi Framework Profile">OSGi framework profile</a>.</td><td style="">$SERVER_HOME/configuration</td></tr></tbody></table></div></div><br class="table-break"><div class="section" lang="en"><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" style="border-collapse: collapse;border-top: 1.0pt solid ; border-bottom: 1.0pt solid ; border-left: 1.0pt solid ; border-right: 1.0pt solid ; "><colgroup><col><col></colgroup><thead><tr><th style="border-right: 1.0pt solid ; border-bottom: 1.0pt solid ; ">Property</th><th style="border-bottom: 1.0pt solid ; ">Description</th></tr></thead><tbody><tr><td style="border-right: 1.0pt solid ; border-bottom: 1.0pt solid ; "><code class="literal">org.eclipse.virgo.kernel.startup.wait.limit</code></td><td style="border-bottom: 1.0pt solid ; ">
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 style="border-right: 1.0pt solid ; border-bottom: 1.0pt solid ; "><code class="literal">org.eclipse.virgo.suppress.heap.dumps</code></td><td style="border-bottom: 1.0pt solid ; ">
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 style="border-right: 1.0pt solid ; "><code class="literal">osgi.java.profile</code></td><td style="">
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" lang="en"><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" lang="en"><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" style="border-collapse: collapse;border-top: 1.0pt solid ; border-bottom: 1.0pt solid ; border-left: 1.0pt solid ; border-right: 1.0pt solid ; "><colgroup><col><col></colgroup><thead><tr><th style="border-right: 1.0pt solid ; border-bottom: 1.0pt solid ; ">Property</th><th style="border-bottom: 1.0pt solid ; ">Description</th></tr></thead><tbody><tr><td style="border-right: 1.0pt solid ; border-bottom: 1.0pt solid ; "><code class="literal">org.osgi.framework.bootdelegation</code></td><td style="border-bottom: 1.0pt solid ; ">
<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 style="border-right: 1.0pt solid ; "><code class="literal">org.osgi.framework.system.packages</code></td><td style="">
<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><!--Begin LoopFuse code--><script src="http://loopfuse.net/webrecorder/js/listen.js" type="text/javascript"></script><script type="text/javascript">
_lf_cid = "LF_48be82fa";
_lf_remora();
</script><!--End LoopFuse code--><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch12s02.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch13s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">12.2&nbsp;Undeploying Artifacts&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;13.2&nbsp;Configuring Framework Extensions and Fragments on the System Bundle</td></tr></table></div></body></html>