geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v3.0 > Configuring the OSGi environment
Date Tue, 01 Feb 2011 03:51:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2036/9/4/_/styles/combined.css?spaceKey=GMOxDOC30&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Configuring+the+OSGi+environment">Configuring
the OSGi environment</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~gawor">Jarek
Gawor</a>
    </h4>
        <br/>
                         <h4>Changes (12)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-unchanged" >{scrollbar} <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{excerpt}Geronimo
uses Karaf as the OSGi framework and comes with both Equinox and Felix pre-installed as runtime.
You can easily configure the OSGi environment by updating {{.properties}} files under {{/etc}}
directory.{excerpt} By default, Geronimo server uses [Equinox|http://www.eclipse.org/equinox/|Equinox]
as its default OSGi runtime. The following is a list of simple tasks for your demonstration.
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{excerpt}Geronimo
provides two OSGi frameworks: [Eclipse Equinox|http://www.eclipse.org/equinox/|Eclipse Equinox]
and [Apache Felix|http://felix.apache.org/|Apache Felix]. You can easily configure which OSGi
framework is used at runtime by updating the {{etc/onfig.properties}} configuration file.{excerpt}
By default, Geronimo server uses Equinox as its default OSGi runtime. The following example
show how to configure Geronimo to use Felix as its OSGi framework. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" >* <span class="diff-changed-words">[Chan<span
class="diff-added-chars"style="background-color: #dfd;">g</span>ing</span>
the OSGi runtime|#changingtheosgiruntime] <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">*
[Enabling OSGi framework debugging|#enablingosgiframeworkdebugging ] <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h2. Changing the OSGi runtime
<br></td></tr>
            <tr><td class="diff-changed-lines" >The {{config.properties}} file
is the system properties file of underlying OSGi framework of Geronimo, in which stores the
initial configuration parameters to start up <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">a
Karaf</span> <span class="diff-added-words"style="background-color: #dfd;">the</span>
framework. <br></td></tr>
            <tr><td class="diff-unchanged" > <br># Open {{config.properties}}
file under {{/etc}} directory. <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">#
Uncomment the line with *karaf.framework=equinox* and comment out the line with *karaf.framework=felix*.
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">#
Comment out the line with *karaf.framework=equinox* and uncomment the line with *karaf.framework=felix*.
<br></td></tr>
            <tr><td class="diff-changed-lines" ># Specify the location of <span
class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Flex</span>
<span class="diff-added-words"style="background-color: #dfd;">Felix</span> bundle
using the key *karaf.framework.felix*. The following code snippet is an updated <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{{config.properteis}}</span>
<span class="diff-added-words"style="background-color: #dfd;">{{config.properties}}</span>
file. <br></td></tr>
            <tr><td class="diff-unchanged" >{code:java|title=config.properties}
<br>... <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" ># Framework selection properties <br>#
<br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">#<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">
  </span>karaf.framework=equinox</span> <br></td></tr>
            <tr><td class="diff-unchanged" >karaf.framework=felix <br></td></tr>
            <tr><td class="diff-unchanged" > <br>karaf.framework.felix=repository/org/apache/felix/org.apache.felix.framework/3.0.2/org.apache.felix.framework-3.0.2.jar
<br>... <br>{code} <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">#
Save the file and restart the server. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">See
[Apache karaf|http://karaf.apache.org|Apache karaf] for more information about those *key=value*
pairs in the {{config.properties}} file. <br> <br>h2. Enabling OSGi framework
debugging <br>The {{equinox-debug.properties}} is used to configure debug options for
Equinox runtime. To enable debug for the Equinox runtime. <br># Open {{config.properties}}
file under {{/etc}} directory. <br># Comment out the line with *osgi.debug=$\{karaf.home}/etc/equinox-debug.properties*.
<br># Update value of each parameter in the {{equinox-debug.properties}} file as needed.
The following code snippet is an updated {{config.properteis}} file. <br>{code:java|title=config.properties}
<br>... <br># <br># Debug options for Equinox <br># <br> osgi.debug=${karaf.home}/etc/equinox-debug.properties
<br>... <br>{code} <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">#</span>
Save the file and restart the server. <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/GMOxDOC30/Changing+the+username+and+password"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/GMOxDOC30/Changing+the+username+and+password">Changing
the username and password</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/GMOxDOC30/Initial+configuration"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/GMOxDOC30/Initial+configuration">Initial configuration</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/GMOxDOC30/Substituting+one+module+with+another">Substituting
one module with another</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/GMOxDOC30/Substituting+one+module+with+another"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

<p>Geronimo provides two OSGi frameworks: <a href="http://www.eclipse.org/equinox/"
title="Eclipse Equinox" class="external-link" rel="nofollow">Eclipse Equinox</a>
and <a href="http://felix.apache.org/" title="Apache Felix" class="external-link" rel="nofollow">Apache
Felix</a>. You can easily configure which OSGi framework is used at runtime by updating
the <tt>etc/onfig.properties</tt> configuration file. By default, Geronimo server
uses Equinox as its default OSGi runtime. The following example show how to configure Geronimo
to use Felix as its OSGi framework.</p>

<ul>
	<li><a href="#ConfiguringtheOSGienvironment-changingtheosgiruntime">Changing
the OSGi runtime</a></li>
</ul>


<h2><a name="ConfiguringtheOSGienvironment-ChangingtheOSGiruntime"></a>Changing
the OSGi runtime</h2>
<p>The <tt>config.properties</tt> file is the system properties file of
underlying OSGi framework of Geronimo, in which stores the initial configuration parameters
to start up the framework.</p>

<ol>
	<li>Open <tt>config.properties</tt> file under <tt>/etc</tt>
directory.</li>
	<li>Comment out the line with <b>karaf.framework=equinox</b> and uncomment
the line with <b>karaf.framework=felix</b>.</li>
	<li>Specify the location of Felix bundle using the key <b>karaf.framework.felix</b>.
The following code snippet is an updated <tt>config.properties</tt> file.
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>config.properties</b></div><div
class="codeContent panelContent">
<pre class="code-java">
...
#
# Framework selection properties
#
#karaf.framework=equinox
karaf.framework=felix

karaf.framework.felix=repository/org/apache/felix/org.apache.felix.framework/3.0.2/org.apache.felix.framework-3.0.2.jar
...
</pre>
</div></div></li>
</ol>


<p>Save the file and restart the server.</p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Configuring+the+OSGi+environment">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=23335159&revisedVersion=6&originalVersion=5">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Configuring+the+OSGi+environment?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message