Issue #2154 - Added documentation and links. Resovles #2154

This commit is contained in:
WalkerWatch 2018-01-31 14:51:44 -05:00
parent 8e55d0d6a7
commit ec769390b8
2 changed files with 16 additions and 9 deletions

View File

@ -100,6 +100,13 @@ This jar contains a `Fragment-Host` directive that ensures the ALPN classes will
You can download the http://central.maven.org/maven2/org/eclipse/jetty/osgi/jetty-osgi-alpn/[jetty-osgi-alpn jar] from Maven Central. You can download the http://central.maven.org/maven2/org/eclipse/jetty/osgi/jetty-osgi-alpn/[jetty-osgi-alpn jar] from Maven Central.
____
[NOTE]
OSGi *requires* a `ServiceLoader` implementation for Jetty to function properly.
OSGi leverages http://aries.apache.org/modules/spi-fly.html[Apache Aries SPI Fly] for this functionality.
You can read more about OSGi and `ServiceLoader` http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html[here.]
____
[[alpn-troubleshooting]] [[alpn-troubleshooting]]
==== ALPN Troubleshooting ==== ALPN Troubleshooting
@ -259,7 +266,7 @@ You can enable debug logging for the ALPN implementation in this way:
ALPN.debug = true; ALPN.debug = true;
.... ....
Since the ALPN class is in the boot classpath, we chose not to use logging libraries because we do not want to override application logging library choices; therefore thelogging is performed directly on `System.err`. Since the ALPN class is in the boot classpath, we chose not to use logging libraries because we do not want to override application logging library choices; therefore the logging is performed directly on `System.err`.
[[alpn-openjdk8-license-details]] [[alpn-openjdk8-license-details]]
==== License Details ==== License Details

View File

@ -46,10 +46,10 @@ Here's the absolute minimal set of Jetty jars:
|jetty-osgi-servlet-api |org.eclipse.jetty.osgi-servlet-api |jetty-osgi-servlet-api |org.eclipse.jetty.osgi-servlet-api
|=================================================== |===================================================
You *should also install the Aries SpiFly bundles*, because many parts of jetty - for example ALPN, websocket, annotations - use the ServiceLoader mechanism, which requires an OSGi Service Loader Mediator like SpiFly: You *must also install the Apache Aries SPI Fly bundles* as many parts of Jetty - for example ALPN, websocket, annotations - use the `ServiceLoader` mechanism, which requires an OSGi Service Loader Mediator like SPI Fly:
[[spifly]] [[spifly]]
.SpiFly Bundles .SPI Fly Bundles
[cols=",,",options="header",] [cols=",,",options="header",]
|======================================================================= |=======================================================================
|Jar |Bundle Symbolic Name |Location |Jar |Bundle Symbolic Name |Location
@ -874,12 +874,12 @@ ____
Even if your webapp itself does not not use annotations, you may need to deploy these jars because your webapp depends on a Jetty module or a 3rd party library that uses a http://docs.oracle.com/javaee/6/api/javax/servlet/ServletContainerInitializer.html[javax.servlet.ServletContainerInitializer]. Even if your webapp itself does not not use annotations, you may need to deploy these jars because your webapp depends on a Jetty module or a 3rd party library that uses a http://docs.oracle.com/javaee/6/api/javax/servlet/ServletContainerInitializer.html[javax.servlet.ServletContainerInitializer].
This interface requires annotation support. This interface requires annotation support.
It is implemented by providers of code that extend the capabilities of the container. It is implemented by providers of code that extend the capabilities of the container.
An xample of this is the Jetty JSR356 Websocket implementation, although it is being used increasingly commonly in popular libraries like link:http://projects.spring.io/spring-framework/[Spring], link:https://jersey.java.net/[Jersey] and JSP containers. An example of this is the Jetty JSR356 Websocket implementation, although it is being used increasingly commonly in popular libraries like link:http://projects.spring.io/spring-framework/[Spring], link:https://jersey.java.net/[Jersey] and JSP containers.
To find `ServletContainerInitializers` on the classpath, Jetty uses the Java http://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html[`ServiceLoader`] To find `ServletContainerInitializers` on the classpath, Jetty uses the Java http://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html[`ServiceLoader`]
mechanism. mechanism.
For this to function in OSGi, you will need an OSGi R5 compatible container, and have support for the http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html[Service Loader Mediator]. For this to function in OSGi, you will need an OSGi R5 compatible container, and have support for the http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html[Service Loader Mediator].
Jetty has been tested with the http://aries.apache.org/modules/spi-fly.html[Aries SpiFly] module,which is the reference implementation of the Service Loader Mediator, and is listed in the jars above. Jetty has been tested with the http://aries.apache.org/modules/spi-fly.html[Aries SpiFly] module, which is the reference implementation of the Service Loader Mediator, and is listed in the jars above.
==== OSGi Containers ==== OSGi Containers