aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1447316 - /aries/site/trunk/content/modules/spi-fly.mdtext
Date Mon, 18 Feb 2013 15:22:09 GMT
Author: davidb
Date: Mon Feb 18 15:22:09 2013
New Revision: 1447316

URL: http://svn.apache.org/r1447316
Log:
Updated SPI Fly documentation after 1.0.0 release.

Modified:
    aries/site/trunk/content/modules/spi-fly.mdtext

Modified: aries/site/trunk/content/modules/spi-fly.mdtext
URL: http://svn.apache.org/viewvc/aries/site/trunk/content/modules/spi-fly.mdtext?rev=1447316&r1=1447315&r2=1447316&view=diff
==============================================================================
--- aries/site/trunk/content/modules/spi-fly.mdtext (original)
+++ aries/site/trunk/content/modules/spi-fly.mdtext Mon Feb 18 15:22:09 2013
@@ -66,15 +66,22 @@ Dependencies:
 
 **For use with static weaving:**
 
+  - [SPI Fly Static Weaving command-line tool 1.0.0][6]
+  - [SPI Fly Static Weaving Bundle 1.0.0][7]
+
+Dependencies:
+
+  - [Aries Util 1.1.0][8]
+
 ###Building the code###
 The code can be found in
-[http://svn.apache.org/repos/asf/aries/trunk/spi-fly][6].
+[http://svn.apache.org/repos/asf/aries/trunk/spi-fly][9].
 
 To build, use Maven 3.x and run <tt>mvn install</tt>
 
 #<a id="specconf"/>Configuration: OSGi Spec-compliant#
 All the details surrounding this type of configuration are covered in the 
-[OSGi Enterprise Specification][7] (from version 5) chapter 133. This section provides a
short overview.
+[OSGi Enterprise Specification][10] (from version 5) chapter 133. This section provides a
short overview.
 
 ##Providers##
 SPI provider bundles opt in to being registered by specifying a requirement on the 
@@ -89,7 +96,7 @@ Additionally, they need to provide capab
 While this example omits it, it is advisable to specify <tt>uses</tt> constraints
on the Provide-Capability header, to 
 ensure consistent class spaces.
 
-See the [<tt>spi-fly-example-provider2-bundle</tt>][8] for an example of a spec-compliant
provider.
+See the [<tt>spi-fly-example-provider2-bundle</tt>][11] for an example of a spec-compliant
provider.
 
 ##Consumers##
 
@@ -108,7 +115,7 @@ All requirements are combined into a sin
 
 <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>
 
-See the [<tt>spi-fly-example-client2-bundle</tt>][9] for an example of a spec-compliant
consumer.
+See the [<tt>spi-fly-example-client2-bundle</tt>][12] for an example of a spec-compliant
consumer.
 
 #<a id="specificconf"/>Configuration: SPI Fly-specific#
 This section describes how to use SPI Fly's proprietary configuration
@@ -137,7 +144,7 @@ The <tt>SPI-Provider</tt> header can eit
 that holds the original unmodified jar containing the provider internally as a 
 on the <tt>Bundle-ClassPath</tt>.
 
-See the [<tt>spi-fly-example-provider1-bundle</tt>][10] for an example of a provider
using this type of configuration.
+See the [<tt>spi-fly-example-provider1-bundle</tt>][13] for an example of a provider
using this type of configuration.
 
 ##Consumers##
 Service consumers also need to opt in to the process. 
@@ -157,7 +164,7 @@ call <tt>DocumentBuilderFactory.newInsta
 * **SPI-Consumer: org.foo.Foo#someMthd(),org.bar.Bar#myMethod()** weave calls to <tt>Foo.someMthd()</tt>
and 
 <tt>Bar.myMethod()</tt>.
 
-See the [<tt>spi-fly-example-client1-bundle</tt>][11] for an example of a consumer
using this type of configuration. 
+See the [<tt>spi-fly-example-client1-bundle</tt>][14] for an example of a consumer
using this type of configuration. 
 
 ###Special Cases###
 SPI Fly can be used for most SPI provider/lookup systems that use the TCCL pattern to obtain
@@ -189,8 +196,8 @@ If you have an pre-4.3 OSGi framework or
 can use the static weaving approach.
 
 ##Use with Dynamic Weaving##
-Install and start the [<tt>org.apache.aries.spifly.dynamic.bundle</tt>][12] into
the system. This bundle 
-has a dependency on <tt>[org.objectweb.asm][13]</tt> version 4.0 or newer and
on the Aries 
+Install and start the [<tt>org.apache.aries.spifly.dynamic.bundle</tt>][15] into
the system. This bundle 
+has a dependency on <tt>[org.objectweb.asm][16]</tt> version 4.0 or newer and
on the Aries 
 Util bundle.
 
 <pre>g! lb
@@ -215,7 +222,7 @@ bundle and inserts calls to set the corr
 Provider bundles are still handled dynamically.
 
 ###To statically weave a bundle###
-The easiest way to invoke the static weaver is to take the [<tt>org.apache.aries.spifly.static.tool</tt>][14]
+The easiest way to invoke the static weaver is to take the [<tt>org.apache.aries.spifly.static.tool</tt>][17]
 jar with dependencies.
 
 Then run the static tool on any bundle that needs processing:
@@ -226,15 +233,15 @@ java -jar org.apache.aries.spifly.static
 This will produce a second bundle with the same name with the _spifly suffix appended, so

 in this case the generated bundle will be called mybundle_spifly.jar.
 
-At runtime, install the [<tt>org.apache.aries.spifly.static.bundle</tt>][15]
into the system, like
+At runtime, install the [<tt>org.apache.aries.spifly.static.bundle</tt>][18]
into the system, like
 the dynamic weaving bundle it has a dependency on the Aries Util bundle:
-<pre>osgi> ss
-Framework is launched.
-id	State       Bundle
-0	ACTIVE      org.eclipse.osgi_3.6.2.R36x_v20110210
-1	ACTIVE      org.eclipse.osgi.services_3.2.100.v20100503
-2	ACTIVE      org.apache.aries.util_1.0.0
-3	ACTIVE      org.apache.aries.spifly.static.bundle_1.0.0</pre>
+<pre>g! lb
+START LEVEL 1
+   ID|State      |Level|Name
+    0|Active     |    0|System Bundle (4.0.3)
+... bundles 1-4 are framework/console internal ones ...
+    5|Active     |    1|Apache Aries Util (1.1.0)
+    6|Active     |    1|Apache Aries SPI Fly Static Weaving Bundle (1.0.0)</pre>
 
 Then install and start the statically woven bundle into the system.
 
@@ -244,13 +251,13 @@ used for testing or experimenting.
 
 The following modules can be found in this directory:
 
-* **spi-fly-example-spi-bundle** - a bundle providing an SPI interface used by the other
example bundles. [osgi-bundle][16] [source][17]
-* **spi-fly-example-provider1-jar** - a plain jar file providing an implementation of the
SPI (via <tt>META-INF/services</tt>). [source][18]
-* **spi-fly-example-provider1-bundle** - a bundle that wraps the jar file from the previous
bullet and specifies it in its Bundle-ClassPath. This example represents the common case where
an existing SPI provider is wrapped as-is in an OSGi bundle. This example uses the SPI Fly
proprietary configuration. [osgi-bundle][19] [source][20]
-* **spi-fly-example-provider2-bundle** - a bundle that directly provides an SPI service (via
<tt>META-INF/services</tt>). This example uses OSGi  specification compliant configuration.
[osgi-bundle][21] [source][22] 
-* **spi-fly-example-client1-jar** - a plain jar using java.util.ServiceLoader.load() to obtain
and invoke all services provided of a certain SPI. [source][23]
-* **spi-fly-example-client1-bundle** - a bundle that wraps the jar file from the previous
bullet and lists it in its Bundle-ClassPath. This example represents the common case where
an existing SPI consumer is wrapped as-is in an OSGi bundle. This example uses SPI Fly proprietary
configuration. [osgi-bundle][24] [source][25]
-* **spi-fly-example-client2-bundle** - a bundle that has code that invokes <tt>java.util.ServiceLoader.load()</tt>
directly. This example uses OSGi specification compliant configuration. [osgi-bundle][26]
[source][27]
+* **spi-fly-example-spi-bundle** - a bundle providing an SPI interface used by the other
example bundles. [osgi-bundle][19] [source][20]
+* **spi-fly-example-provider1-jar** - a plain jar file providing an implementation of the
SPI (via <tt>META-INF/services</tt>). [source][21]
+* **spi-fly-example-provider1-bundle** - a bundle that wraps the jar file from the previous
bullet and specifies it in its Bundle-ClassPath. This example represents the common case where
an existing SPI provider is wrapped as-is in an OSGi bundle. This example uses the SPI Fly
proprietary configuration. [osgi-bundle][22] [source][23]
+* **spi-fly-example-provider2-bundle** - a bundle that directly provides an SPI service (via
<tt>META-INF/services</tt>). This example uses OSGi  specification compliant configuration.
[osgi-bundle][24] [source][25] 
+* **spi-fly-example-client1-jar** - a plain jar using java.util.ServiceLoader.load() to obtain
and invoke all services provided of a certain SPI. [source][26]
+* **spi-fly-example-client1-bundle** - a bundle that wraps the jar file from the previous
bullet and lists it in its Bundle-ClassPath. This example represents the common case where
an existing SPI consumer is wrapped as-is in an OSGi bundle. This example uses SPI Fly proprietary
configuration. [osgi-bundle][27] [source][28]
+* **spi-fly-example-client2-bundle** - a bundle that has code that invokes <tt>java.util.ServiceLoader.load()</tt>
directly. This example uses OSGi specification compliant configuration. [osgi-bundle][29]
[source][30]
 
 
   [1]: http://www.osgi.org/Download/Release5 "OSGi Enterprise Specification"
@@ -258,25 +265,28 @@ The following modules can be found in th
   [3]: 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
   [4]: http://search.maven.org/remotecontent?filepath=org/apache/aries/org.apache.aries.util/1.1.0/org.apache.aries.util-1.1.0.jar
   [5]: http://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-all/4.0/asm-all-4.0.jar
-  [6]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly
-  [7]: http://www.osgi.org/Download/Release5 "OSGi Enterprise Specification"
-  [8]: #examples
-  [9]: #examples
-  [10]: #examples
+  [6]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/org.apache.aries.spifly.static.tool/1.0.0/org.apache.aries.spifly.static.tool-1.0.0-jar-with-dependencies.jar
+  [7]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/org.apache.aries.spifly.static.bundle/1.0.0/org.apache.aries.spifly.static.bundle-1.0.0.jar
+  [8]: http://search.maven.org/remotecontent?filepath=org/apache/aries/org.apache.aries.util/1.1.0/org.apache.aries.util-1.1.0.jar
+  [9]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly
+  [10]: http://www.osgi.org/Download/Release5 "OSGi Enterprise Specification"
   [11]: #examples
-  [12]: #releases
-  [13]: http://search.maven.org/#artifactdetails|org.ow2.asm|asm-all|4.0|jar
-  [14]: #releases
+  [12]: #examples
+  [13]: #examples
+  [14]: #examples
   [15]: #releases
-  [16]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.spi.bundle/1.0.0/org.apache.aries.spifly.examples.spi.bundle-1.0.0.jar
-  [17]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-spi-bundle/
-  [18]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider1-jar/
-  [19]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.provider1.bundle/1.0.0/org.apache.aries.spifly.examples.provider1.bundle-1.0.0.jar
-  [20]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider1-bundle/
-  [21]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.provider2.bundle/1.0.0/org.apache.aries.spifly.examples.provider2.bundle-1.0.0.jar
-  [22]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider2-bundle/
-  [23]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client1-jar/
-  [24]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.client1.bundle/1.0.0/org.apache.aries.spifly.examples.client1.bundle-1.0.0.jar
-  [25]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client1-bundle/
-  [26]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.client2.bundle/1.0.0/org.apache.aries.spifly.examples.client2.bundle-1.0.0.jar
-  [27]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client2-bundle/
\ No newline at end of file
+  [16]: http://search.maven.org/#artifactdetails|org.ow2.asm|asm-all|4.0|jar
+  [17]: #releases
+  [18]: #releases
+  [19]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.spi.bundle/1.0.0/org.apache.aries.spifly.examples.spi.bundle-1.0.0.jar
+  [20]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-spi-bundle/
+  [21]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider1-jar/
+  [22]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.provider1.bundle/1.0.0/org.apache.aries.spifly.examples.provider1.bundle-1.0.0.jar
+  [23]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider1-bundle/
+  [24]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.provider2.bundle/1.0.0/org.apache.aries.spifly.examples.provider2.bundle-1.0.0.jar
+  [25]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider2-bundle/
+  [26]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client1-jar/
+  [27]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.client1.bundle/1.0.0/org.apache.aries.spifly.examples.client1.bundle-1.0.0.jar
+  [28]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client1-bundle/
+  [29]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.client2.bundle/1.0.0/org.apache.aries.spifly.examples.client2.bundle-1.0.0.jar
+  [30]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client2-bundle/
\ No newline at end of file



Mime
View raw message