[KARAF-2511] Add the cdi page in the user guide
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/39390da5 Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/39390da5 Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/39390da5 Branch: refs/heads/master Commit: 39390da5f229b07fedc4e7f272abf12fd3c2b8fb Parents: 6e68e80 Author: Jean-Baptiste Onofré <[email protected]> Authored: Fri Dec 20 14:16:56 2013 +0100 Committer: Jean-Baptiste Onofré <[email protected]> Committed: Fri Dec 20 14:16:56 2013 +0100 ---------------------------------------------------------------------- manual/src/main/webapp/_navigation.conf | 2 +- manual/src/main/webapp/manual.conf | 1 + manual/src/main/webapp/users-guide/cdi.conf | 77 ++++++++++++++++++++++ manual/src/main/webapp/users-guide/ejb.conf | 4 +- manual/src/main/webapp/users-guide/index.conf | 2 +- 5 files changed, 82 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/karaf/blob/39390da5/manual/src/main/webapp/_navigation.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/_navigation.conf b/manual/src/main/webapp/_navigation.conf index a7f5c98..ccc6d00 100644 --- a/manual/src/main/webapp/_navigation.conf +++ b/manual/src/main/webapp/_navigation.conf @@ -28,7 +28,7 @@ h3. [Users Guide|/users-guide/index] -- [MOM (JMS)|/users-guide/jms] -- [Persistence (JPA)|/users-guide/jpa] -- [EJB|/users-guide/ejb] --- CDI +-- [CDI|/users-guide/cdi] -- [HA/failover and cluster|/users-guide/failover] - [Monitoring|/users-guide/monitoring] - [WebConsole|/users-guide/webconsole] http://git-wip-us.apache.org/repos/asf/karaf/blob/39390da5/manual/src/main/webapp/manual.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/manual.conf b/manual/src/main/webapp/manual.conf index e3e4f4a..f86f7de 100644 --- a/manual/src/main/webapp/manual.conf +++ b/manual/src/main/webapp/manual.conf @@ -57,6 +57,7 @@ h1. Users Guide {include:users-guide/jms} {include:users-guide/jpa} {include:users-guide/ejb} +{include:users-guide/cdi} {include:users-guide/failover} {include:users-guide/monitoring} {include:users-guide/webconsole} http://git-wip-us.apache.org/repos/asf/karaf/blob/39390da5/manual/src/main/webapp/users-guide/cdi.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/users-guide/cdi.conf b/manual/src/main/webapp/users-guide/cdi.conf new file mode 100644 index 0000000..e48c267 --- /dev/null +++ b/manual/src/main/webapp/users-guide/cdi.conf @@ -0,0 +1,77 @@ +h1. CDI + +This section described how to add support of CDI, and embed a CDI container in Apache Karaf. It doesn't describe +how to develop CDI applications. See the developer guide for that. + +h2. Pax CDI + +Apache Karaf supports different CDI containers by using Pax CDI. + +Pax CDI is pre-referenced in Apache Karaf. To register the Pax CDI features, you can do: + +{code} +karaf@root()> feature:repo-add pax-cdi +{code} + +This command will register the latest pax-cdi features. + +You can see now a set of new CDI features available: + +{code} +karaf@root()> feature:list|grep -i cdi +pax-cdi | 0.6.0 | | org.ops4j.pax.cdi-0.6.0 | Provide CDI support +pax-cdi-1.1 | 0.6.0 | | org.ops4j.pax.cdi-0.6.0 | Provide CDI 1.1 support +pax-cdi-weld | 0.6.0 | | org.ops4j.pax.cdi-0.6.0 | Weld CDI support +pax-cdi-1.1-weld | 0.6.0 | | org.ops4j.pax.cdi-0.6.0 | Weld CDI 1.1 support +pax-cdi-openwebbeans | 0.6.0 | | org.ops4j.pax.cdi-0.6.0 | OpenWebBeans CDI support +pax-cdi-web | 0.6.0 | | org.ops4j.pax.cdi-0.6.0 | Web CDI support +pax-cdi-1.1-web | 0.6.0 | | org.ops4j.pax.cdi-0.6.0 | Web CDI 1.1 support +pax-cdi-web-weld | 0.6.0 | | org.ops4j.pax.cdi-0.6.0 | Weld Web CDI support +pax-cdi-1.1-web-weld | 0.6.0 | | org.ops4j.pax.cdi-0.6.0 | Weld Web CDI 1.1 support +pax-cdi-web-openwebbeans | 0.6.0 | | org.ops4j.pax.cdi-0.6.0 | OpenWebBeans Web CDI support +pax-cdi-deltaspike-core | >0.5 | | org.ops4j.pax.cdi-0.6.0 | Apache Deltaspike core support +pax-cdi-deltaspike-jpa | 0.5 | | org.ops4j.pax.cdi-0.6.0 | Apche Deltaspike jpa support +{code} + +h2. CDI Containers + +Thanks to Pax CDI, Apache Karaf supports multiple CDI implementation versions, and different CDI containers. + +You just have to install the feature corresponding to the CDI container and version that you want to use. + +h3. Apache OpenWebBeans + +Apache Karaf provides a ready to use feature for Apache OpenWebBeans. + +The {{openwebbeans}} feature automatically install the Pax CDI features and the Apache OpenWebBeans bundles: + +{code} +karaf@root()> feature:install openwebbeans +{code} + +{warning} +Don't forget to register the pax-cdi features repository first with: + +{code} +karaf@root()> feature:repo-add pax-cdi +{code} +{warning} + +h3. JBoss Weld CDI container + +Apache Karaf provides a ready to use feature for JBoss Weld. + +The {{weld}} feature automatically install the Pax CDI features and the JBoss Weld bundles: + +{code} +karaf@root()> feature:install weld +{code} + +{warning} +Don't forget to register the pax-cdi features repository first with: + +{code} +karaf@root()> feature:repo-add pax-cdi +{code} +{warning} + http://git-wip-us.apache.org/repos/asf/karaf/blob/39390da5/manual/src/main/webapp/users-guide/ejb.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/users-guide/ejb.conf b/manual/src/main/webapp/users-guide/ejb.conf index 2ea6eae..c54c586 100644 --- a/manual/src/main/webapp/users-guide/ejb.conf +++ b/manual/src/main/webapp/users-guide/ejb.conf @@ -1,7 +1,7 @@ h1. EJB -This section describes how to add support of EJB in Apache Karaf. It doesn't describe how to develop EJB applications in -Apache Karaf. See the developer guide for details about that. +This section describes how to add support of EJB in Apache Karaf. It doesn't describe how to develop EJB applications. +See the developer guide for that. h2. Apache OpenEJB http://git-wip-us.apache.org/repos/asf/karaf/blob/39390da5/manual/src/main/webapp/users-guide/index.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/users-guide/index.conf b/manual/src/main/webapp/users-guide/index.conf index ce17495..7c41a66 100644 --- a/manual/src/main/webapp/users-guide/index.conf +++ b/manual/src/main/webapp/users-guide/index.conf @@ -23,7 +23,7 @@ h1. Users Guide ** [MOM (JMS)|jms] ** [Persistence (JPA)|jpa] ** [EJB|ejb] -** CDI +** [CDI|cdi] ** [HA/failover and cluster|failover] * [Monitoring|monitoring] * [WebConsole|webconsole]
