Author: davidb
Date: Thu Feb 6 14:17:13 2014
New Revision: 1565263
URL: http://svn.apache.org/r1565263
Log:
[SPI Fly] Add description for spi-fly-example-resource-provider-bundle and
spi-fly-example-resource-client-bundle
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=1565263&r1=1565262&r2=1565263&view=diff
==============================================================================
--- aries/site/trunk/content/modules/spi-fly.mdtext (original)
+++ aries/site/trunk/content/modules/spi-fly.mdtext Thu Feb 6 14:17:13 2014
@@ -259,12 +259,13 @@ The following modules can be found in th
* **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]
* **spi-fly-example-provider-consumer-bundle** - a bundle that is both a
provider and a consumer at the same time. [source][31]
+* **spi-fly-example-resource-provider-bundle** and
**spi-fly-example-resource-client-bundle** - these bundles show that SPI Fly
can be used to control the TCCL in OSGi for any situation, in this case applied
to resource loading via the TCCL. The provider bundle provides a resource used
by the Foo.doit() API. The client bundle contains Foo.doit() and in there calls
Thread.getContextClassLoader().getResource() to obtain the resource. The TCCL
has visibility of the provider bundle because both bundles have the appropriate
values set in the SPI-Provider and SPI-Consumer headers. Source [here][32] and
[here][33].
##More Information##
More information can be found at the following resources:
- - OSGi Service Loader Mediator specification. [OSGi Enterprise
specification][32], Chapter 133.
- - OSGi Blog article:
[http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html][33]
+ - OSGi Service Loader Mediator specification. [OSGi Enterprise
specification][34], Chapter 133.
+ - OSGi Blog article:
[http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html][35]
[1]: http://www.osgi.org/Download/Release5 "OSGi Enterprise Specification"
@@ -298,5 +299,7 @@ More information can be found at the fol
[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/
[31]:
http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider-consumer-bundle/
- [32]: http://www.osgi.org/Download/Release5
- [33]: http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html
\ No newline at end of file
+ [32]:
http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-resource-provider-bundle/
+ [33]:
http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-resource-client-bundle/
+ [34]: http://www.osgi.org/Download/Release5
+ [35]: http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html
\ No newline at end of file