Author: buildbot
Date: Tue Mar  3 16:44:32 2020
New Revision: 1057331

Log:
Staging update by buildbot for felix

Removed:
    
websites/staging/felix/trunk/content/documentation/development/bnd-testing-harness.html
Modified:
    websites/staging/felix/trunk/content/   (props changed)
    websites/staging/felix/trunk/content/documentation/development.html
    
websites/staging/felix/trunk/content/documentation/tutorials-examples-and-presentations/apache-felix-application-demonstration.html
    websites/staging/felix/trunk/content/sitemap.html

Propchange: websites/staging/felix/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Mar  3 16:44:32 2020
@@ -1 +1 @@
-1874739
+1874740

Modified: websites/staging/felix/trunk/content/documentation/development.html
==============================================================================
--- websites/staging/felix/trunk/content/documentation/development.html 
(original)
+++ websites/staging/felix/trunk/content/documentation/development.html Tue Mar 
 3 16:44:32 2020
@@ -90,7 +90,6 @@ h2:hover > .headerlink, h3:hover > .head
 h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, 
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, 
dt:hover > .elementid-permalink { visibility: visible }</style>
 <p>This page contains links related to Felix project development.</p>
 <ul>
-<li><a href="/documentation/development/bnd-testing-harness.html">BND Testing 
Harness</a></li>
 <li><a href="/documentation/development/building-felix.html">Building Apache 
Felix</a></li>
 <li><a href="/documentation/development/coding-standards.html">Coding 
Standards</a></li>
 <li><a 
href="/documentation/development/dependencies-file-template.html">DEPENDENCIES 
file template</a></li>

Modified: 
websites/staging/felix/trunk/content/documentation/tutorials-examples-and-presentations/apache-felix-application-demonstration.html
==============================================================================
--- 
websites/staging/felix/trunk/content/documentation/tutorials-examples-and-presentations/apache-felix-application-demonstration.html
 (original)
+++ 
websites/staging/felix/trunk/content/documentation/tutorials-examples-and-presentations/apache-felix-application-demonstration.html
 Tue Mar  3 16:44:32 2020
@@ -89,14 +89,8 @@ h2:hover > .headerlink, h3:hover > .head
 }
 h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, 
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, 
dt:hover > .elementid-permalink { visibility: visible }</style>
 <p><em>(This document is a work in progress.)</em></p>
-<p>Apache Felix provides a foundation for creating modular and dynamically 
extensible applications. This page presents an example application to 
demonstrate the various approaches to consider when creating a OSGi/Felix-based 
application. It is recommended that you have a look at the more <a 
href="">basic examples</a> such as [FELIX:Apache Felix Framework Usage 
Documentation] before you start with this one.</p>
-<p>In order to follow this example you need three things:</p>
-<ol>
-<li>A <a href="http://subversion.apache.org/";>Subversion</a> client to check 
out the source code,</li>
-<li>The IDE of your choice to view the source code, and</li>
-<li><a href="http://maven.apache.org";>Maven</a> to build the source code.</li>
-</ol>
-<p>The source code of the examples is available in the Felix SVN repository at 
<a 
href="http://svn.apache.org/repos/asf/felix/trunk/examples";>http://svn.apache.org/repos/asf/felix/trunk/examples</a>.
 If you feel more familiar with git, you can use the git mirror at: 
[git://git.apache.org/felix.git] or browse the source code at github: 
[https://github.com/apache/felix]</p>
+<p>Apache Felix provides a foundation for creating modular and dynamically 
extensible applications. This page presents an example application to 
demonstrate the various approaches to consider when creating a OSGi/Felix-based 
application. </p>
+<p>The source code of the examples is available in the Felix repository at <a 
href="https://github.com/apache/felix-dev/tree/master/examples";>https://github.com/apache/felix-dev/tree/master/examples</a>.</p>
 <h2 id="potential-approaches">Potential Approaches<a class="headerlink" 
href="#potential-approaches" title="Permanent link">&para;</a></h2>
 <p>When creating an OSGi-based application there are two main orthogonal 
issues to consider:</p>
 <ol>
@@ -110,24 +104,20 @@ h2:hover > .headerlink, h3:hover > .head
 <p>The example application is a very simple paint program that effectively 
functions identically whether using services/extensions or running 
embedded/hosted. The application, called the host, defines a 
<code>SimpleShape</code> service/extension that it uses to draw shapes. 
Different implementations of the <code>SimpleShape</code> can be created to 
allow the application to draw different shapes. Each shape service/extension 
has name and icon properties that the application uses for manipulating the 
services/extensions. Available shapes are displayed in the application's tool 
bar. To draw a shape, click on its button in the tool bar and then click in the 
drawing canvas. Shapes can be dragged, but not resized. When new shape 
services/extensions appear they are automatically added to the tool bar and 
they are automatically removed when the shape services/extensions disappear. 
Closing the application window causes the framework and the JVM to shut down. 
The following is a screen shot of
  the application.</p>
 <p>!example-application.png|align=center!</p>
 <h2 id="getting-the-source-code">Getting the source code<a class="headerlink" 
href="#getting-the-source-code" title="Permanent link">&para;</a></h2>
-<p>Currently, the example application is only available in our source control 
repositories. We have created two applications, one for the service-based and 
one for the extender-based approach. Both examples can be run as a bundled 
application on top of any OSGi implementation or by hosting an embedded 
framework. Assuming you are using svn to get the source code, you can find the 
source at the following locations:</p>
-<div class="codehilite"><pre><span class="n">http</span><span 
class="p">:</span><span class="o">//</span><span class="n">svn</span><span 
class="p">.</span><span class="n">apache</span><span class="p">.</span><span 
class="n">org</span><span class="o">/</span><span class="n">repos</span><span 
class="o">/</span><span class="n">asf</span><span class="o">/</span><span 
class="n">felix</span><span class="o">/</span><span class="n">trunk</span><span 
class="o">/</span><span class="n">examples</span><span class="o">/</span><span 
class="n">servicebased</span><span class="p">.</span><span class="n">host</span>
-<span class="n">http</span><span class="p">:</span><span 
class="o">//</span><span class="n">svn</span><span class="p">.</span><span 
class="n">apache</span><span class="p">.</span><span class="n">org</span><span 
class="o">/</span><span class="n">repos</span><span class="o">/</span><span 
class="n">asf</span><span class="o">/</span><span class="n">felix</span><span 
class="o">/</span><span class="n">trunk</span><span class="o">/</span><span 
class="n">examples</span><span class="o">/</span><span 
class="n">servicebased</span><span class="p">.</span><span 
class="n">circle</span>
-<span class="n">http</span><span class="p">:</span><span 
class="o">//</span><span class="n">svn</span><span class="p">.</span><span 
class="n">apache</span><span class="p">.</span><span class="n">org</span><span 
class="o">/</span><span class="n">repos</span><span class="o">/</span><span 
class="n">asf</span><span class="o">/</span><span class="n">felix</span><span 
class="o">/</span><span class="n">trunk</span><span class="o">/</span><span 
class="n">examples</span><span class="o">/</span><span 
class="n">servicebased</span><span class="p">.</span><span 
class="n">square</span>
-<span class="n">http</span><span class="p">:</span><span 
class="o">//</span><span class="n">svn</span><span class="p">.</span><span 
class="n">apache</span><span class="p">.</span><span class="n">org</span><span 
class="o">/</span><span class="n">repos</span><span class="o">/</span><span 
class="n">asf</span><span class="o">/</span><span class="n">felix</span><span 
class="o">/</span><span class="n">trunk</span><span class="o">/</span><span 
class="n">examples</span><span class="o">/</span><span 
class="n">servicebased</span><span class="p">.</span><span 
class="n">triangle</span>
-
-<span class="n">http</span><span class="p">:</span><span 
class="o">//</span><span class="n">svn</span><span class="p">.</span><span 
class="n">apache</span><span class="p">.</span><span class="n">org</span><span 
class="o">/</span><span class="n">repos</span><span class="o">/</span><span 
class="n">asf</span><span class="o">/</span><span class="n">felix</span><span 
class="o">/</span><span class="n">trunk</span><span class="o">/</span><span 
class="n">examples</span><span class="o">/</span><span 
class="n">extenderbased</span><span class="p">.</span><span 
class="n">host</span>
-<span class="n">http</span><span class="p">:</span><span 
class="o">//</span><span class="n">svn</span><span class="p">.</span><span 
class="n">apache</span><span class="p">.</span><span class="n">org</span><span 
class="o">/</span><span class="n">repos</span><span class="o">/</span><span 
class="n">asf</span><span class="o">/</span><span class="n">felix</span><span 
class="o">/</span><span class="n">trunk</span><span class="o">/</span><span 
class="n">examples</span><span class="o">/</span><span 
class="n">extenderbased</span><span class="p">.</span><span 
class="n">circle</span>
-<span class="n">http</span><span class="p">:</span><span 
class="o">//</span><span class="n">svn</span><span class="p">.</span><span 
class="n">apache</span><span class="p">.</span><span class="n">org</span><span 
class="o">/</span><span class="n">repos</span><span class="o">/</span><span 
class="n">asf</span><span class="o">/</span><span class="n">felix</span><span 
class="o">/</span><span class="n">trunk</span><span class="o">/</span><span 
class="n">examples</span><span class="o">/</span><span 
class="n">extenderbased</span><span class="p">.</span><span 
class="n">square</span>
-<span class="n">http</span><span class="p">:</span><span 
class="o">//</span><span class="n">svn</span><span class="p">.</span><span 
class="n">apache</span><span class="p">.</span><span class="n">org</span><span 
class="o">/</span><span class="n">repos</span><span class="o">/</span><span 
class="n">asf</span><span class="o">/</span><span class="n">felix</span><span 
class="o">/</span><span class="n">trunk</span><span class="o">/</span><span 
class="n">examples</span><span class="o">/</span><span 
class="n">extenderbased</span><span class="p">.</span><span 
class="n">triangle</span>
-</pre></div>
-
-
-<p>Check out each project using an appropriate SVN command, such as:</p>
-<div class="codehilite"><pre><span class="n">svn</span> <span 
class="n">co</span> <span class="n">http</span><span class="p">:</span><span 
class="o">//</span><span class="n">svn</span><span class="p">.</span><span 
class="n">apache</span><span class="p">.</span><span class="n">org</span><span 
class="o">/</span><span class="n">repos</span><span class="o">/</span><span 
class="n">asf</span><span class="o">/</span><span class="n">felix</span><span 
class="o">/</span><span class="n">trunk</span><span class="o">/</span><span 
class="n">examples</span><span class="o">/</span><span 
class="n">servicebased</span><span class="p">.</span><span class="n">host</span>
-</pre></div>
-
-
+<p>Currently, the example application is only available in our source control 
repositories. We have created two applications, one for the service-based and 
one for the extender-based approach. Both examples can be run as a bundled 
application on top of any OSGi implementation or by hosting an embedded 
framework. 
+Check out each project using an appropriate command, such as:</p>
+<p>git clone https://github.com/apache/felix-dev.git felix-dev</p>
+<p>You can find the source at the following locations:</p>
+<ul>
+<li>felix-dev/examples/servicebased.host</li>
+<li>felix-dev/examples/servicebased.circle</li>
+<li>felix-dev/examples/servicebased.square</li>
+<li>felix-dev/examples/servicebased.triangle</li>
+<li>felix-dev/examples/extenderbased.host</li>
+<li>felix-dev/examples/extenderbased.circle</li>
+<li>felix-dev/examples/extenderbased.square</li>
+<li>felix-dev/examples/extenderbased.triangle</li>
+</ul>
 <h2 id="building-and-running-the-examples">Building and running the examples<a 
class="headerlink" href="#building-and-running-the-examples" title="Permanent 
link">&para;</a></h2>
 <p>Once you have checked out the projects you can go into each sub-directory 
and build it using Maven; this assumes you have Maven properly installed. To 
build, simply perform the following in each project directory:</p>
 <div class="codehilite"><pre><span class="n">mvn</span> <span 
class="n">clean</span> <span class="n">install</span>
@@ -149,7 +139,7 @@ h2:hover > .headerlink, h3:hover > .head
 <h2 id="service-based-application">Service-Based Application<a 
class="headerlink" href="#service-based-application" title="Permanent 
link">&para;</a></h2>
 <p>The service-based application uses the OSGi service concept and the service 
registry as the extensibility mechanism. Therefore the host bundle contains a 
service interface located at 
<code>org.apache.felix.example.servicebased.host.service.SimpleShape</code>. 
The SimpleShape service has two properties: a name and an icon. Besides that it 
defines one operation: <code>draw(Graphics2D g2, Point p)</code>.</p>
 <h3 id="defining-shapes-as-services">Defining shapes as services<a 
class="headerlink" href="#defining-shapes-as-services" title="Permanent 
link">&para;</a></h3>
-<p>Bundles that want to contribute a shape service have to implement the 
<code>SimpleShape</code> interface. Take a look at the circle bundle for 
example. The circle bundle only contains one class, the <code>Activator</code>. 
A 
<code>[BundleActivator](http://www.osgi.org/javadoc/r4v43/org/osgi/framework/BundleActivator.html)</code>
 is responsible for starting up a bundle. Therefore it gets passed in a 
<code>[BundleContext|http://www.osgi.org/javadoc/r4v43/org/osgi/framework/BundleContext.html]</code>,
 that can be used to perform registration of services within the framework. The 
<code>Activator</code> also contains an inner class that implements the 
<code>SimpleShape</code> interface and therefore represents the 
<code>SimpleShape</code> implementation of a circle. The 
<code>start(BundleContext context</code> method is used to register the circle 
implementation as a service:</p>
+<p>Bundles that want to contribute a shape service have to implement the 
<code>SimpleShape</code> interface. Take a look at the circle bundle for 
example. The circle bundle only contains one class, the <code>Activator</code>. 
A <a 
href="http://www.osgi.org/javadoc/r4v43/org/osgi/framework/BundleActivator.html";>BundleActivator</a>
 is responsible for starting up a bundle. Therefore it gets passed in a <a 
href="http://www.osgi.org/javadoc/r4v43/org/osgi/framework/BundleContext.html";>BundleContext</a>,
 that can be used to perform registration of services within the framework. The 
<code>Activator</code> also contains an inner class that implements the 
<code>SimpleShape</code> interface and therefore represents the 
<code>SimpleShape</code> implementation of a circle. The 
<code>start(BundleContext context</code> method is used to register the circle 
implementation as a service:</p>
 <div class="codehilite"><pre><span class="n">Dictionary</span><span 
class="o">&lt;</span><span class="n">String</span><span class="p">,</span> 
<span class="n">Object</span><span class="o">&gt;</span> <span 
class="n">dict</span> <span class="p">=</span> <span class="n">new</span> <span 
class="n">Hashtable</span><span class="o">&lt;</span><span 
class="n">String</span><span class="p">,</span> <span 
class="n">Object</span><span class="o">&gt;</span><span class="p">();</span>
 <span class="n">dict</span><span class="p">.</span><span 
class="n">put</span><span class="p">(</span><span 
class="n">SimpleShape</span><span class="p">.</span><span 
class="n">NAME_PROPERTY</span><span class="p">,</span> &quot;<span 
class="n">Circle</span>&quot;<span class="p">);</span>
 <span class="n">dict</span><span class="p">.</span><span 
class="n">put</span><span class="p">(</span><span 
class="n">SimpleShape</span><span class="p">.</span><span 
class="n">ICON_PROPERTY</span><span class="p">,</span> <span 
class="n">new</span> <span class="n">ImageIcon</span><span 
class="p">(</span><span class="n">this</span><span class="p">.</span><span 
class="n">getClass</span><span class="p">().</span><span 
class="n">getResource</span><span class="p">(</span>&quot;<span 
class="n">circle</span><span class="p">.</span><span 
class="n">png</span>&quot;<span class="p">)));</span>
@@ -157,13 +147,13 @@ h2:hover > .headerlink, h3:hover > .head
 </pre></div>
 
 
-<p>First a 
<code>[Dictionary](http://docs.oracle.com/javase/6/docs/api/java/util/Dictionary.html)</code>
 is created to hold the service's properties. The two service properties are 
added to the dictionary. The icon of the circle service is located under 
src/main/resources/org/apache/example/servicebased/circle/circle.png. It gets 
loaded as an 
<code>[ImageIcon|http://docs.oracle.com/javase/6/docs/api/javax/swing/ImageIcon.html]</code>
 and added as icon property. The service then gets registered in the service 
registry by passing the name of the service interface, a service object and the 
service's properties.</p>
+<p>First a <a 
href="http://docs.oracle.com/javase/6/docs/api/java/util/Dictionary.html";>Dictionary</a>
 is created to hold the service's properties. The two service properties are 
added to the dictionary. The icon of the circle service is located under 
src/main/resources/org/apache/example/servicebased/circle/circle.png. It gets 
loaded as an <a 
href="http://docs.oracle.com/javase/6/docs/api/javax/swing/ImageIcon.html";>ImageIcon</a>`
 and added as icon property. The service then gets registered in the service 
registry by passing the name of the service interface, a service object and the 
service's properties.</p>
 <h3 id="detecting-shape-services">Detecting shape services<a 
class="headerlink" href="#detecting-shape-services" title="Permanent 
link">&para;</a></h3>
-<p>The host's <code>Activator</code> creates a <code>DrawingFrame</code> for 
displaying the different shapes. It then delegates adding and removing of 
<code>SimpleShape</code> services to a 
<code>[ServiceTracker](http://www.osgi.org/javadoc/r4v43/org/osgi/util/tracker/ServiceTracker.html)</code>
 implementation. The <code>ShapeTracker</code> gets notified, when a new 
<code>SimpleShape</code> service is added to, modified or removed from the 
service registry.</p>
+<p>The host's <code>Activator</code> creates a <code>DrawingFrame</code> for 
displaying the different shapes. It then delegates adding and removing of 
<code>SimpleShape</code> services to a <a 
href="http://www.osgi.org/javadoc/r4v43/org/osgi/util/tracker/ServiceTracker.html";>ServiceTracker</a>
 implementation. The <code>ShapeTracker</code> gets notified, when a new 
<code>SimpleShape</code> service is added to, modified or removed from the 
service registry.</p>
 <h2 id="extender-based-application">Extender-Based Application<a 
class="headerlink" href="#extender-based-application" title="Permanent 
link">&para;</a></h2>
 <p>In contrast to the service-based example, the extender-based example uses 
bundles as it's primary extensibility mechanism. The host bundle contains a 
<code>SimpleShape</code> interface that is much like the one from the service 
based example. It also contains a <code>draw(Graphics2D g2, Point p)</code> 
method and defines a set of properties. This time the properties are not used 
as properties for registering a service, but for defining bundle header 
properties in the bundle's <code>MANIFEST.MF</code> file.</p>
 <h3 id="defining-shapes-as-extensions">Defining shapes as extensions<a 
class="headerlink" href="#defining-shapes-as-extensions" title="Permanent 
link">&para;</a></h3>
-<p>Bundles that want to contribute a <code>SimpleShape</code> extension have 
to implement the <code>SimpleShape</code> interface. Have a look at the 
extender-based circle implementation, for example. It only contains one class, 
<code>Circle</code>, that implements <code>SimpleShape</code>. Note, that in 
contrast to the service-based example there is no need to define a 
<code>[BundleActivator](http://www.osgi.org/javadoc/r4v43/org/osgi/framework/BundleActivator.html)</code>.
 This is because, there is no need to register a service within the framework. 
Information about the provided shape implementation is located in the bundle 
headers instead. Have a look at the circle's <code>MANIFEST.MF</code> file:</p>
+<p>Bundles that want to contribute a <code>SimpleShape</code> extension have 
to implement the <code>SimpleShape</code> interface. Have a look at the 
extender-based circle implementation, for example. It only contains one class, 
<code>Circle</code>, that implements <code>SimpleShape</code>. Note, that in 
contrast to the service-based example there is no need to define a <a 
href="http://www.osgi.org/javadoc/r4v43/org/osgi/framework/BundleActivator.html";>BundleActivator</a>.
 This is because, there is no need to register a service within the framework. 
Information about the provided shape implementation is located in the bundle 
headers instead. Have a look at the circle's <code>MANIFEST.MF</code> file:</p>
 <div class="codehilite"><pre><span class="n">Manifest</span><span 
class="o">-</span><span class="n">Version</span><span class="p">:</span> 1<span 
class="p">.</span>0
 <span class="n">Private</span><span class="o">-</span><span 
class="n">Package</span><span class="p">:</span> <span 
class="n">org</span><span class="p">.</span><span class="n">apache</span><span 
class="p">.</span><span class="n">felix</span><span class="p">.</span><span 
class="n">example</span><span class="p">.</span><span 
class="n">extenderbased</span><span class="p">.</span><span 
class="n">circle</span>
 <span class="n">Tool</span><span class="p">:</span> <span 
class="n">Bnd</span><span class="o">-</span>0<span class="p">.</span>0<span 
class="p">.</span>238
@@ -189,15 +179,15 @@ h2:hover > .headerlink, h3:hover > .head
 <p>As you can see, the three bundle properties, defined in the 
<code>SimpleShape</code> interface are set as bundle headers.</p>
 <p>Note: The manifest file is generated by the Maven build, so you will only 
find it in the compiled jar. If you are interested in automatically creating 
manifest files for your bundles, have a look at the configuration of the <a 
href="http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html";>org.apache.felix.maven-bundle-plugin</a>
 in the pom.xml.</p>
 <h3 id="detecting-shape-bundles">Detecting shape bundles<a class="headerlink" 
href="#detecting-shape-bundles" title="Permanent link">&para;</a></h3>
-<p>Like the 
<code>[ServiceTracker](http://www.osgi.org/javadoc/r4v43/org/osgi/util/tracker/ServiceTracker.html)</code>
 for tracking services, there is a 
<code>[BundleTracker|http://www.osgi.org/javadoc/r4v42/org/osgi/util/tracker/BundleTracker.html]</code>
 for tracking bundles. A <code>BundleTracker</code> get's notified, when the 
state of tracked bundles change. Have a look at 
<code>org.apache.felix.example.extenderbased.host.ShapeBundleTracker</code>. 
The constructor defines that only active bundles should be tracked. The 
<code>addingBundle(Bundle bundle, BundleEvent event)</code> method gets called 
by the framework, when a bundle enters the activated state. The tracker then 
checks if the bundle's headers contain the extension name property and, if so, 
adds the icon to the application.</p>
+<p>Like the <a 
href="http://www.osgi.org/javadoc/r4v43/org/osgi/util/tracker/ServiceTracker.html";>ServiceTracker</a>
 for tracking services, there is a <a 
href="http://www.osgi.org/javadoc/r4v42/org/osgi/util/tracker/BundleTracker.html";>BundleTracker</a>
 for tracking bundles. A <code>BundleTracker</code> get's notified, when the 
state of tracked bundles change. Have a look at 
<code>org.apache.felix.example.extenderbased.host.ShapeBundleTracker</code>. 
The constructor defines that only active bundles should be tracked. The 
<code>addingBundle(Bundle bundle, BundleEvent event)</code> method gets called 
by the framework, when a bundle enters the activated state. The tracker then 
checks if the bundle's headers contain the extension name property and, if so, 
adds the icon to the application.</p>
 <h2 id="embedding-the-framework">Embedding the Framework<a class="headerlink" 
href="#embedding-the-framework" title="Permanent link">&para;</a></h2>
-<p>The OSGi R4.2 specification defines APIs to allow an application to host 
it's own embedded framework instance. Therefore an implementation of the 
<code>[FrameworkFactory](http://www.osgi.org/javadoc/r4v42/org/osgi/framework/launch/FrameworkFactory.html)</code>
 interface has to be used. OSGi implementers specify their 
<code>FrameworkFactory</code> implementation in the 
<code>META-INF/services/org.osgi.framework.launch.FrameworkFactory</code> file. 
Prior to Java 6, one had to parse the class name in that file by oneself. 
Luckily Java 6 has the 
<code>[ServiceLoader&lt;S&gt;|http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html]</code>
 class, that lets you easily instantiate a <code>FrameworkFactoy</code>. Have a 
look at the contents of the 
<code>org.apache.felix.example.extenderbased.host.launch</code> package in the 
extender-based host bundle (the implementation is the same for the 
service-based example).</p>
+<p>The OSGi R4.2 specification defines APIs to allow an application to host 
it's own embedded framework instance. Therefore an implementation of the <a 
href="http://www.osgi.org/javadoc/r4v42/org/osgi/framework/launch/FrameworkFactory.html";>FrameworkFactory</a>
 interface has to be used. OSGi implementers specify their 
<code>FrameworkFactory</code> implementation in the 
<code>META-INF/services/org.osgi.framework.launch.FrameworkFactory</code> file. 
Prior to Java 6, one had to parse the class name in that file by oneself. 
Luckily Java 6 has the <a 
href="http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html";>ServiceLoader</a>
 class, that lets you easily instantiate a <code>FrameworkFactoy</code>. Have a 
look at the contents of the 
<code>org.apache.felix.example.extenderbased.host.launch</code> package in the 
extender-based host bundle (the implementation is the same for the 
service-based example).</p>
 <p>The <code>Application</code> class is responsible for creating the 
framework and installing and starting the bundles. It uses a 
<code>ConfigUtil</code> for creating the framework configuration that is needed 
to create a framework using the <code>FrameworkFactory</code>. The 
<code>ConfigUtil</code> also creates a temporary cache directory for the 
framework. If the creation of the framework is successful, 
<code>installAndStartBundles(String... bundleLocations)</code> will be called 
to start the actual application. Therefore the <code>Activator</code> of the 
host bundle is instantiated. Note, that the host bundle can not register itself 
within the framework it just created. Only the extension bundles will be 
registered within the framework.</p>
 <p>As you can see no Felix-specific code is involved in any of the examples. 
That's one of the advantages of OSGi specification. Bundles that run on Felix 
will run on every other implementation of the same OSGi release.</p>
 <h2 id="feedback">Feedback<a class="headerlink" href="#feedback" 
title="Permanent link">&para;</a></h2>
-<p>Subscribe to the Felix users mailing list by sending a message to <a 
href="">users-subscr...@felix.apache.org</a>; after subscribing, email 
questions or feedback to 
[us...@felix.apache.org|mailto:us...@felix.apache.org].</p>
+<p>Subscribe to the Felix users mailing list by sending a message to <a 
href="">users-subscr...@felix.apache.org</a>; after subscribing, email 
questions or feedback to <a 
href="mailto:us...@felix.apache.org";>us...@felix.apache.org</a>.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; 
text-align: right;">
-        Rev. 1712487 by cziegeler on Wed, 4 Nov 2015 07:41:18 +0000
+        Rev. 1874740 by pauls on Tue, 3 Mar 2020 16:43:44 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Felix, Felix, Apache, the Apache feather logo, and the Apache 
Felix project

Modified: websites/staging/felix/trunk/content/sitemap.html
==============================================================================
--- websites/staging/felix/trunk/content/sitemap.html (original)
+++ websites/staging/felix/trunk/content/sitemap.html Tue Mar  3 16:44:32 2020
@@ -97,7 +97,6 @@ h2:hover > .headerlink, h3:hover > .head
 </ul>
 </li>
 <li><a href="/documentation/development.html">Development</a><ul>
-<li><a href="/documentation/development/bnd-testing-harness.html">BND Testing 
Harness</a></li>
 <li><a href="/documentation/development/building-felix.html">Building Apache 
Felix</a></li>
 <li><a href="/documentation/development/coding-standards.html">Coding 
Standards</a></li>
 <li><a 
href="/documentation/development/dependencies-file-template.html">DEPENDENCIES 
file template</a></li>


Reply via email to