Merge pull request #1837 from akka/wip-3687-osgi-dependency-doc-patriknw
=doc Add dependency and sample to osgi docs
This commit is contained in:
commit
064470cf1f
1 changed files with 24 additions and 2 deletions
|
|
@ -1,6 +1,14 @@
|
|||
Akka in OSGi
|
||||
============
|
||||
|
||||
In an OSGi environment the ``akka-osgi`` bundle replaces ``akka-actor`` artifact. It includes all classes from ``akka-actor`` and merged ``reference.conf`` files from all akka modules. The dependency is::
|
||||
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-osgi_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
</dependency>
|
||||
|
||||
Configuring the OSGi Framework
|
||||
------------------------------
|
||||
|
||||
|
|
@ -8,15 +16,15 @@ To use Akka in an OSGi environment, the ``org.osgi.framework.bootdelegation``
|
|||
property must be set to always delegate the ``sun.misc`` package to the boot classloader
|
||||
instead of resolving it through the normal OSGi class space.
|
||||
|
||||
|
||||
Activator
|
||||
---------
|
||||
|
||||
To bootstrap Akka inside an OSGi environment, you can use the akka.osgi.AkkaSystemActivator class
|
||||
To bootstrap Akka inside an OSGi environment, you can use the ``akka.osgi.AkkaSystemActivator`` class
|
||||
to conveniently set up the ActorSystem.
|
||||
|
||||
.. includecode:: code/osgi/Activator.scala#Activator
|
||||
|
||||
The ``AkkaSystemActivator`` class is included in the ``akka-osgi`` artifact.
|
||||
|
||||
Blueprint
|
||||
---------
|
||||
|
|
@ -25,3 +33,17 @@ For the Apache Aries Blueprint implementation, there's also a namespace handler
|
|||
is http://akka.io/xmlns/blueprint/v1.0.0 and it can be used to set up an ActorSystem.
|
||||
|
||||
.. includecode:: code/osgi/blueprint.xml
|
||||
|
||||
The blueprint is included in the ``akka-osgi-aries`` artifact::
|
||||
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-osgi-aries_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
</dependency>
|
||||
|
||||
Sample
|
||||
------
|
||||
|
||||
A complete sample project is provided in `akka-sample-osgi-dining-hakkers <@github@/akka-samples/akka-sample-osgi-dining-hakkers>`_.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue