Author: rafabene
Date: Fri Dec 12 17:33:28 2014
New Revision: 1644984
URL: http://svn.apache.org/r1644984
Log:
DELTASPIKE-722 - Content converted to ASCIIDOC
Modified:
deltaspike/site/trunk/content/retired/documentation.mdtext
Modified: deltaspike/site/trunk/content/retired/documentation.mdtext
URL:
http://svn.apache.org/viewvc/deltaspike/site/trunk/content/retired/documentation.mdtext?rev=1644984&r1=1644983&r2=1644984&view=diff
==============================================================================
--- deltaspike/site/trunk/content/retired/documentation.mdtext (original)
+++ deltaspike/site/trunk/content/retired/documentation.mdtext Fri Dec 12
17:33:28 2014
@@ -18,560 +18,46 @@ Notice: Licensed to the Apache Softwa
[TOC]
-***
-
-# Introduction
-
-Apache DeltaSpike project has been created to support the development of
portable CDI extensions that provide useful features for Java applications
-not provided out of the box by the CDI spec (Security, JPA, ...). CDI
extensions created by the DeltaSpike community are packaged as modules.
-
-Therefore, Apache DeltaSpike is a great toolbox for CDI. More than a set of
powerful extension and tools to ease extension development, DeltaSpike also
proves that CDI allows Java EE to evolve between each release.
-
-The goal of the project is also to provide useful classes to :
-
-* Boot CDI Container (Weld, OpenWebbeans, OpenEJB) for Java SE,
-* Stage a project,
-* Provide new scopes (Window Scope, ...),
-* Manage messages and configurations
-
-The project is currently tested on different CDI implementations like Apache
OpenWebBeans and JBoss Weld, and also on different Java Web containers like
Apache TomEE or JavaEE, JBoss AS7, Oracle GlassFish 3.1+, Oracle WebLogic
Server 12c.
-
-## What is a portable CDI extension ?
-
-A portable CDI extension means that CDI itself can be extended. Such
extensions can be used with any spec. compliant CDI implementation. From the
user perspective, it means that you can simply drop in CDI extension jars into
your runtime e.g. to integrate third-party APIs with CDI or to improve existing
JavaEE-APIs.
-
-The CDI Portable extensions SPI (Service Provider Interface) allows to define
additional beans, scopes, stereotypes, interceptors and decorators. The SPI of
CDI is a powerful vehicle for innovation and DeltaSpike is an example of it.
-
-## DeltaSpike in a nutshell
-
-###Java EE 7 without Java EE 7!
-
-**Transactional support for non-EJB beans:**
-The Transactional Interceptor in DeltaSpike paved the way for @Transactional
in Java EE 7.
-
-**Injectable Servlet objects:**
-Allows the developer to inject CDI beans on Servlets on Java EE 6/CDI 1.0
environments
-
-**Injectable resources:**
-Configuration, resource bundles,... are easy to inject when using CDI and
Apache DeltaSpike.
-
-**@Exclude annotation:**
-it's possible to annotate beans which should be ignored by CDI even if they
are in a CDI enabled archive on Java EE 6/CDI 1.0 environment where you can't
use @Vetoed or a veto based on project-stages or expressions is needed.
-
-**Scheduling tasks**:
-Async processes in a non Java EE 7 environment.
-
-**Bean Validation integration:**
-Allows to inject CDI beans and EJB in to Constraint-Validators.
-
-**BeanProvider:**
-Access the BeanManager and CDI beans even in non managed classes like JPA-2.0
EntityListeners or Spring Beans.
-
-###JSF Improvements
-
-**Multi-window handling:**
-Allows to manage logical windows for batches,... or in case of JSF it offers
proper separation of browser-tabs.
-
-**Type-safe view-config:**
-It allows to bind meta-data (e.g. for security) to views with a type-safe, but
flexible approach. It provides a more solid navigation in case of JSF and helps
a lot in the maintenance phase.
-
-**View-Controller:**
-Based on type-safe view-configs view-controller annotations provide a
type-safe alternative to standard-tags.
-
-**Injection on Converters and Validators:**
-Allows to inject CDI beans and EJB in to JSF Converters and Validators.
-
-**JSF event broadcasting to CDI:**
-Allows CDI to be notified about JSF events
-
-###Productivity Improvements
-
-**Security based on annotations:**
-The foundation for building a robust, capable and non invasive security
solution.
-
-**New CDI scopes:**
-TransactionScoped, WindowScoped, ViewScoped, ViewAccess scope, Grouped
conversion scope
-
-**Container Control & Test Control:**
-Java SE with CDI, all with a unifying API. Start, stop, add classes to a
running CDI container.
-
-**Data Module:**
-An out of the box entity framework solution complete with support for
container or application managed persistence contexts, as well as JDBC.
-
-**Decoupled Exception handling:**
-Allows to do exception handling in one location similar to CDI Observers.
-
-**JMX integration:**
-Any CDI bean can be exposed via JMX easily with one annotation.
-
-**Type-safe i18n messages:**
-Localized messages are easy to use with an interface and a resource bundle, no
more boilerplate and your messages now have context within the code.
-
-**Type-safe Project-Stages:**
-Compared to project-stages in JSF, DeltaSpike provides a type-safe, but still
extensible approach which can be used in CDI based applications.
-
-
-
-# Getting Started
-
-A DeltaSpike project can be designed using or not Apache Maven and consists in
a collection of jar files. Depending on your needs, you will package DeltaSpike
core jar (api and impl) files or extend
-the list with DeltaSpike modules. DeltaSpike Api and Impl are mandatory and
provide code required to benefits of portable CDI extensions or useful features
-created.
-
-Remark : For Java SE, an additional step is required as you have to select the
CDI implementation of your choice to boot a CDI container.
-
-[TODO] Add a section or remark to explain how to package & deploy DeltaSpike
in an OSGI environment (Apache Felix, Apache Karaf, Apache ServiceMix)
-
-## Project Configuration without Maven
-
-You can manually <a href="download.html" target="_blank">download</a> all JARs
described above or you get [the source-code](source.html) and
[build](build.html) DeltaSpike manually.
-
-## Project Configuration with Maven
-
-**Hint:**
-In the listings below replace the placeholders for the version with the
version of your choice or use:
-
- <properties>
- <deltaspike.version>1.0.2</deltaspike.version>
- </properties>
-
-Or if you want to very bleeding edge, point to our current snapshot.
-
- <properties>
- <deltaspike.version>1.0.3-SNAPSHOT</deltaspike.version>
- </properties>
-
-### Configuration of DeltaSpike Core
-
- <dependency>
- <groupId>org.apache.deltaspike.core</groupId>
- <artifactId>deltaspike-core-api</artifactId>
- <version>${deltaspike.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.deltaspike.core</groupId>
- <artifactId>deltaspike-core-impl</artifactId>
- <version>${deltaspike.version}</version>
- <scope>runtime</scope>
- </dependency>
-
-### Configuration of DeltaSpike Modules
-
-#### Security Module
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-security-module-api</artifactId>
- <version>${deltaspike.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-security-module-impl</artifactId>
- <version>${deltaspike.version}</version>
- <scope>runtime</scope>
- </dependency>
-
-#### JPA Module
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-jpa-module-api</artifactId>
- <version>${deltaspike.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-jpa-module-impl</artifactId>
- <version>${deltaspike.version}</version>
- <scope>runtime</scope>
- </dependency>
-
-#### JSF Module
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-jsf-module-api</artifactId>
- <version>${deltaspike.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-jsf-module-impl</artifactId>
- <version>${deltaspike.version}</version>
- <scope>runtime</scope>
- </dependency>
-
-Some EE6 servers can't handle optional classes. If you don't like the
corresponding log entries during the startup or the deployment fails, you can
use an alternative impl-module (instead of deltaspike-jsf-module-impl) since
v1.0.1:
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-jsf-module-impl-ee6</artifactId>
- <version>${deltaspike.version}</version>
- <scope>runtime</scope>
- </dependency>
-
-#### Bean Validation Module
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-bean-validation-module-impl</artifactId>
- <version>${deltaspike.version}</version>
- <scope>runtime</scope>
- </dependency>
-
-#### Servlet Module
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-servlet-module-api</artifactId>
- <version>${deltaspike.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-servlet-module-impl</artifactId>
- <version>${deltaspike.version}</version>
- <scope>runtime</scope>
- </dependency>
-
-#### Data Module
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-data-module-api</artifactId>
- <version>${deltaspike.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-data-module-impl</artifactId>
- <version>${deltaspike.version}</version>
- <scope>runtime</scope>
- </dependency>
-
-#### Test-Control Module
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-test-control-module-api</artifactId>
- <version>${deltaspike.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-test-control-module-impl</artifactId>
- <version>${deltaspike.version}</version>
- <scope>test</scope>
- </dependency>
-
-#### Scheduler Module
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-scheduler-module-api</artifactId>
- <version>${deltaspike.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.deltaspike.modules</groupId>
- <artifactId>deltaspike-scheduler-module-impl</artifactId>
- <version>${deltaspike.version}</version>
- <scope>runtime</scope>
- </dependency>
-
-
-### With Java SE
-
-To use DeltaSpike with Java SE, we must provide additional jars file
corresponding to the DeltaSpike CDI Controller API
-and its implementation. The Controller uses Java Services to resolve the CDI
container ([JBoss
Weld](http://docs.jboss.org/weld/reference/1.1.5.Final/en-US/html/), [Apache
OpenWebbeans](http://openwebbeans.apache.org) (and [Apache
OpenEJB](http://openejb.apache.org))) and
-implementation contains the code to manage the [CDI container and
contexts](#container-control-optional).
-
-**Hint:**
-In the listings below replace the placeholders for the version with the
version of your choice or use:
-
- <properties>
- <deltaspike.version>1.0.0</deltaspike.version>
- <owb.version>1.2.0</owb.version>
- <weld.version>1.1.9.Final</weld.version>
- </properties>
-#### Add the DeltaSpike Container Ctrl API
-
- <dependency>
- <groupId>org.apache.deltaspike.cdictrl</groupId>
- <artifactId>deltaspike-cdictrl-api</artifactId>
- <version>${deltaspike.version}</version>
- <scope>compile</scope>
- </dependency>
-
-#### Add a CDI container + Container Ctrl Impl
-
-### ... for Apache OpenWebBeans
-
- <dependency>
- <groupId>org.apache.openwebbeans</groupId>
- <artifactId>openwebbeans-impl</artifactId>
- <version>${owb.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.openwebbeans</groupId>
- <artifactId>openwebbeans-spi</artifactId>
- <version>${owb.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.deltaspike.cdictrl</groupId>
- <artifactId>deltaspike-cdictrl-owb</artifactId>
- <version>${deltaspike.version}</version>
- <scope>runtime</scope>
- </dependency>
-
-### ... for JBoss Weld (RI)
-
- <dependency>
- <groupId>org.apache.deltaspike.cdictrl</groupId>
- <artifactId>deltaspike-cdictrl-weld</artifactId>
- <version>${deltaspike.version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.weld.se</groupId>
- <artifactId>weld-se</artifactId>
- <version>${weld.version}</version>
- <scope>runtime</scope>
- </dependency>
-
-### For Embedded Servlet Runtimes, you can add
-
- <dependency>
- <groupId>org.apache.deltaspike.cdictrl</groupId>
- <artifactId>deltaspike-cdictrl-servlet</artifactId>
- <version>${deltaspike.version}</version>
- <scope>compile</scope>
- </dependency>
-
-### Testing Snapshots
-
-If you would like to test the latest Snapshot, you can
[build](http://deltaspike.apache.org/build.html) DeltaSpike locally or you get
it from the Apache Snapshot-Repository:
-
-
- <repositories>
- <repository>
- <id>apache-snapshot-repository</id>
- <url>http://repository.apache.org/snapshots/</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
-
-
-# Deployment mode
-
-DeltaSpike can be deployed in different Java environments. Depending which
Java container and release you are using, the procedure which is different
-is explained here after.
-
-## With Java EE6+
-
-If you are using DeltaSpike in a Java EE6 environment, you don't need to
configure a CDI implementation explicitly because it's shipped with the
container.
-
-## With Java EE5 or Servlet Containers
-
-Java EE5 application servers as well as pure servlet containers like Apache
Tomcat / Eclipse Jetty don't provide a CDI implementation out-of-the-box.
-So don't forget to setup the CDI implementation of your choice.
-
-## Standard Java SE6+
-
-If you are only using a JDK and runs Java in a standalone or standard mode
(Java SE), then DeltaSpike will allow you to boot a CDI implementation where
you can use Dependency Injection with
-a Bean Manager. Such an example will be presented at the next section.
-
-# Start a CDI container using Java SE
-
-This code snippet show you how with a Java MainApplication a CDI container can
be started (= boot) by DeltaSpike using Java SE and how you
- define a CDI scope and resolve beans injected.
-
-**Hint**: To bootstrap a CDI container in your Java application, you just need
to instantiate the `CdiContainer` and call the `#boot` method.
-
- :::java
- import org.apache.deltaspike.cdise.api.CdiContainer;
- import org.apache.deltaspike.cdise.api.CdiContainerLoader;
-
- public class MainApp {
- public static void main(String[] args) {
-
- CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
- cdiContainer.boot();
-
- // You can use CDI here
-
- cdiContainer.shutdown();
- }
- }
-
-When `#boot` is called, the `CdiContainer` will scan CDI enabled archives for
beans and CDI extensions.
-
-**Note**: Booting the container does <i>not</i> automatically start all CDI
Contexts!
-
-Example for starting the application-context:
-
- :::java
- import org.apache.deltaspike.cdise.api.CdiContainer;
- import org.apache.deltaspike.cdise.api.CdiContainerLoader;
- import org.apache.deltaspike.cdise.api.ContextControl;
- import javax.enterprise.context.ApplicationScoped;
-
- public class MainApp {
- public static void main(String[] args) {
-
- CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
- cdiContainer.boot();
-
- // Starting the application-context allows to use
@ApplicationScoped beans
- ContextControl contextControl = cdiContainer.getContextControl();
- contextControl.startContext(ApplicationScoped.class);
-
- // You can use CDI here
-
- cdiContainer.shutdown();
- }
- }
-
-
-To resolve a bean of this project, you can use the `BeanProvider` provided by
DeltaSpike.
-The following example shows how to resolve the a bean without qualifiers. It
depends on the application if `EchoService` is a concrete implementation or
just an interface. In case of an interface the corresponding implementation
will be resolved.
-The resolved bean is a normal CDI bean which means you can use all CDI
concepts like `@Inject` in the class (and you don't need further usages of
`BeanProvider`).
-
- :::java
- EchoService echoService =
BeanProvider.getContextualReference(EchoService.class, false);
-
-Before the application exits, you have to call `#shutdown` to destroy
beans,... in a well-ordered fashion.
-
-# Module Overview
-
-The core features of DeltaSpike project are packaged under the following
different modules. Some of them are mandatory while others are optional.
-
-## Core (required)
-
-Definition : Contain the API and util classes of DeltaSpike project
-
-<a class="btn" href="core.html">View details »</a>
-
-## Security (optional)
-
-Definition : Intercept and check security
-
-<a class="btn" href="security.html">View details »</a>
-
-## JPA (optional)
-
-Definition :
-
-<a class="btn" href="jpa.html">View details »</a>
-
-## JSF (optional)
-
-Definition :
-
-<a class="btn" href="jsf.html">View details »</a>
-
-## Container Control (optional)
-
-Definition :
-
-<a class="btn" href="container-control.html">View details »</a>
-
-## Bean Validation (optional)
-
-Definition : A module for adding CDI support in Bean Validation.
-
-Features : Allows a developer to create CDI aware `ConstraintValidator`s that
can use business objects (EJBs, ManagedBeans) to support validation needs.
-
-*
-<a class="btn" href="bean-validation.html">View details »</a>
-
-## Servlet (optional)
-
-Definition : The DeltaSpike Servlet module provides integration with the Java
Servlet API.
-
-Features :
-
-* Injection of common servlet objects.
-* Propagation of servlet events to the CDI event bus.
-
-<a class="btn" href="servlet.html">View details »</a>
-
-## Partial-Bean (optional)
-
-<a class="btn" href="partial-bean.html">View details »</a>
-
-## Data (optional)
-
-Definition : The DeltaSpike Data module provides enhanced JPA experience with
declarative queries, reducing boilerplate to a minimum.
-
-Features :
-
-* Derive queries by simple method names or by method annotations defining
JPQL, named queries or plain SQL
-* Result pagination and sorting
-* Auditing of entities
-* A simplified alternative to the Criteria API
-* Mapping of entities from and to DTOs
-
-<a class="btn" href="data.html">View details »</a>
+***
-## Test-Control (optional)
+# Sources
-Definition : This module allows to write CDI based tests easily.
+[DeltaSpike Documentation](/documentation/) is available with [DeltaSpike
Source](documentation/source.html).
-<a class="btn" href="test-control.html">View details »</a>
+# Format
-## Scheduler (optional)
+The format used for DeltaSpike documentation is
[ASCIIDOC](http://www.methods.co.nz/asciidoc/) because it's easily exportable
to PDF, HTML, and it's also easy to contribute. It can be used to export also
to epub and also be used to write books
-Definition : This module provides a simple integration with Quartz v2 (per
default) or any other scheduler which supports cron-expressions for job-classes.
+# Rendering documentation as HTML
-<a class="btn" href="scheduler.html">View details »</a>
+_Requirenment:_ Have [Maven](http://maven.apache.org/) installed.
-# DeltaSpike SPI
+If you cloned the source repository and want to render the documentation as
HTML, you just need to run the following command:
-DeltaSpike Service Provider Interface (SPI)
+ $ cd REPO_ROOT/documentation
+ $ mvn site
-<a class="btn" href="spi.html">View details »</a>
+The generate documentation will be available at
`REPO_ROOT/documentation/target/site`
-# External
+# Contribute
-## Blogs
+If you would like to submit a documentation patch through Jira, you can have a
look at the [suggested approach](suggested-git-workflows.html).
- *
[http://os890.blogspot.com/search/label/deltaspike](http://os890.blogspot.com/search/label/deltaspike)
+# Publish procedure (for committers only)
-## Add-ons
+If you're a committer and want to publish the documentation at [DeltaSpike
Site](http://deltaspike.apache.org/documentation/) you have do the following
steps:
- * [Monitoring- and Auditing](https://github.com/os890/ds-monitoring-addon)
- * [CDI/Spring Bridge](https://github.com/os890/ds-spring-bridge-addon)
- * [Fast events via Disruptor](https://github.com/os890/ds-disruptor-addon)
+Put the following information in your ~/.m2/settings.xml file
-## Project Templates
+ <server>
+ <id>deltaspike-site</id>
+ <username><YOUR_USERNAME></username>
+ <password><YOUR_PASSWORD></password>
+ </server>
- * [Java SE + CDI +
DS](https://github.com/os890/javase-cdi-ds-project-template)
- * [JSF + CDI + DS
(Servlet-Container)](https://github.com/os890/javaweb-cdi-ds-project-template)
- * [EJB + CDI + DS
(Module)](https://github.com/os890/javaee_cdi_ejb_ds_project_template)
- * [JSF + EJB + CDI + DS
(EE-Server)](https://github.com/os890/javaee_jsf_cdi_ejb_ds_project_template)
+Then run:
-## Examples
+ $ mvn site-deploy
-See <a href="examples.html#External">External Examples</a>
+After log in to <https://cms.apache.org/deltaspike/publish> and click on the
`Submit` button.
\ No newline at end of file