You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by bu...@apache.org on 2013/02/18 16:02:18 UTC

svn commit: r850979 - in /websites/staging/aries/trunk/content: ./ modules/spi-fly.html

Author: buildbot
Date: Mon Feb 18 15:02:17 2013
New Revision: 850979

Log:
Staging update by buildbot for aries

Modified:
    websites/staging/aries/trunk/content/   (props changed)
    websites/staging/aries/trunk/content/modules/spi-fly.html

Propchange: websites/staging/aries/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Feb 18 15:02:17 2013
@@ -1 +1 @@
-1447288
+1447290

Modified: websites/staging/aries/trunk/content/modules/spi-fly.html
==============================================================================
--- websites/staging/aries/trunk/content/modules/spi-fly.html (original)
+++ websites/staging/aries/trunk/content/modules/spi-fly.html Mon Feb 18 15:02:17 2013
@@ -308,7 +308,10 @@ the <em>serviceloader.mediator</em> serv
 <h2 id="getting-spi-fly">Getting SPI Fly</h2>
 <h3 id="releases">Releases</h3>
 <p>The latest release of the SPI-Fly components is 1.0.0. It can be obtained from Maven 
-Central:</p>
+Central using the links below.</p>
+<p>To use SPI Fly you need to decide whether to use the dynamic or static weaving version. 
+More information about this can be found in the <a href="#usage">usage section</a>.</p>
+<p><strong>For use with dynamic weaving:</strong></p>
 <ul>
 <li><a href="http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/org.apache.aries.spifly.dynamic.bundle/1.0.0/org.apache.aries.spifly.dynamic.bundle-1.0.0.jar">SPI Fly Dynamic Weaving Bundle 1.0.0</a></li>
 </ul>
@@ -317,8 +320,7 @@ Central:</p>
 <li><a href="http://search.maven.org/remotecontent?filepath=org/apache/aries/org.apache.aries.util/1.1.0/org.apache.aries.util-1.1.0.jar">Aries Util 1.1.0</a></li>
 <li><a href="http://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-all/4.0/asm-all-4.0.jar">ASM 4.0.0</a></li>
 </ul>
-<p>There are no releases of SPI-Fly at this point in time, but when 
-once released releases will be available from Maven Central.</p>
+<p><strong>For use with static weaving:</strong></p>
 <h3 id="building-the-code">Building the code</h3>
 <p>The code can be found in
 <a href="http://svn.apache.org/repos/asf/aries/trunk/spi-fly">http://svn.apache.org/repos/asf/aries/trunk/spi-fly</a>.</p>
@@ -339,14 +341,13 @@ ensure consistent class spaces.</p>
 <p>An SPI consumer (i.e. a bundle using the <tt>java.util.ServiceLoader.load()</tt> API) needs to specify required capabilities
 in the Required-Capability Manifest header. Two different types of requirements must be specified:</p>
 <ul>
-<li>A requirement on the SPI Fly mechanism. This is stated as follows<br/>
+<li>A requirement on the SPI Fly processing mechanism. This is stated as follows<br/>
 <tt>&nbsp;&nbsp;osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)"</tt><br/>
 without this requirement the bundle will not be considered for processing.</li>
 <li>A requirement on the SPI that needs to be provided through this mechanism, for example<br/>
 <tt>&nbsp;&nbsp;osgi.serviceloader; filter:="(osgi.serviceloader=org.apache.aries.spifly.mysvc.MySPIProvider)";cardinality:=multiple</tt><br/>
 Note that the <tt>cardinality</tt> directive is specified to allow multiple bundles to provide the requested capability, allowing
-provided services to come from more than one provider bundle. However at this time of writing some OSGi frameworks ignore
-the cardinality directive.</li>
+provided services to come from more than one provider bundle.</li>
 </ul>
 <p>All requirements are combined into a single Require-Capability header:</p>
 <p><tt>&nbsp;&nbsp;Require-Capability: osgi.serviceloader; filter:="(osgi.serviceloader=org.apache.aries.spifly.mysvc.MySPIProvider)";cardinality:=multiple,osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)"</tt></p>
@@ -397,7 +398,7 @@ call <tt>DocumentBuilderFactory.newInsta
 <p>SPI Fly can be used for most SPI provider/lookup systems that use the TCCL pattern to obtain
 implementations. However, some cases some <em>special treatment</em> is needed. This special treatment is often needed when the API itself does not 
 match the name of the resources in META-INF/services, java.util.ServiceLoader is such a case, however SPI-Fly has built-in knowledge of ServiceLoader.
-Other APIs that require special treatment are listed below:</p>
+Known APIs that require special treatment are listed below:</p>
 <ul>
 <li><strong>javax.imageio.spi.ServiceRegistry</strong>: This class is very much like
 java.util.ServiceLoader in that it can load any kind of API implementation.
@@ -415,7 +416,7 @@ in SPI Fly (yet), but the AudioSystem.ge
 <tt>SPI-Consumer:&nbsp;javax.sound.sampled.AudioSystem#getAudioInputStream
 </tt></li>
 </ul>
-<h1 id="usage">Usage</h1>
+<h1 id="wzxhzdk55usage"><a id="examples"/>Usage</h1>
 <p>There are currently two ways to use the SPI Fly component. If you have an OSGi 
 4.3 (or higher) compliant framework that supports WeavingHooks you can use the dynamic weaving approach. </p>
 <p>If you have an pre-4.3 OSGi framework or don't want to use bytecode weaving at runtime you 
@@ -440,7 +441,7 @@ be active before any bundles that need t
 provide a mechanism to control this.</p>
 <h2 id="use-with-static-weaving">Use with Static Weaving</h2>
 <p>For static use, you need to weave the client bundle before installing it into the system. 
-The modification changes the byte code around java.util.ServiceLoader.load() calls in the 
+The modification changes the byte code around <tt>java.util.ServiceLoader.load()</tt> or other calls in the 
 bundle and inserts calls to set the correct ThreadContextClassLoader around it.
 Provider bundles are still handled dynamically.</p>
 <h3 id="to-statically-weave-a-bundle">To statically weave a bundle</h3>
@@ -462,7 +463,7 @@ id  State       Bundle
 2   ACTIVE      org.apache.aries.util_1.0.0
 3   ACTIVE      org.apache.aries.spifly.static.bundle_1.0.0</pre></p>
 <p>Then install and start the statically woven bundle into the system.</p>
-<h2 id="wzxhzdk69examples"><a id="examples"/>Examples</h2>
+<h2 id="wzxhzdk72examples"><a id="examples"/>Examples</h2>
 <p>The <tt>spi-fly-examples</tt> directory contains a number of example bundles that can be 
 used for testing or experimenting.</p>
 <p>The following modules can be found in this directory:</p>