Return-Path: X-Original-To: apmail-deltaspike-commits-archive@www.apache.org Delivered-To: apmail-deltaspike-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E443E1751D for ; Wed, 29 Oct 2014 18:01:28 +0000 (UTC) Received: (qmail 15753 invoked by uid 500); 29 Oct 2014 18:01:28 -0000 Delivered-To: apmail-deltaspike-commits-archive@deltaspike.apache.org Received: (qmail 15720 invoked by uid 500); 29 Oct 2014 18:01:28 -0000 Mailing-List: contact commits-help@deltaspike.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltaspike.apache.org Delivered-To: mailing list commits@deltaspike.apache.org Received: (qmail 15711 invoked by uid 99); 29 Oct 2014 18:01:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 18:01:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 18:00:59 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 71B3D2388993; Wed, 29 Oct 2014 17:59:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1635230 - in /deltaspike/site/trunk/content/documentation/staging: build.html index.html Date: Wed, 29 Oct 2014 17:59:56 -0000 To: commits@deltaspike.apache.org From: rafabene@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141029175956.71B3D2388993@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rafabene Date: Wed Oct 29 17:59:55 2014 New Revision: 1635230 URL: http://svn.apache.org/r1635230 Log: Site checkin for project Apache DeltaSpike - Documentation Modified: deltaspike/site/trunk/content/documentation/staging/build.html deltaspike/site/trunk/content/documentation/staging/index.html Modified: deltaspike/site/trunk/content/documentation/staging/build.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/staging/build.html?rev=1635230&r1=1635229&r2=1635230&view=diff ============================================================================== --- deltaspike/site/trunk/content/documentation/staging/build.html (original) +++ deltaspike/site/trunk/content/documentation/staging/build.html Wed Oct 29 17:59:55 2014 @@ -7,7 +7,7 @@ -Building DeltaSpike from source +Build and Test DeltaSpike from Source @@ -166,205 +166,207 @@ body {
-

Building DeltaSpike from source

+

Build and Test DeltaSpike from Source


-
-

Introduction

+
-

Deltaspike uses maven build tool to automate the compilation, testing and packaging of the project

-
-
-

Full build

-
-
-
mvn clean install
-
-
-
-
-

Build with test

-
-
-
mvn clean install -POWB //execute the unit tests with OpenWebBeans
-or
-mvn clean install -PWeld //execute the unit tests with Weld
-
-
-
-
-

Integration Tests

-
-

With the unpack Maven-Plugin all Arquillian-Tests get copied to the -integration-test module. Together with the special integration-tests -they get executed via a remote container. Currently we have -configurations for the following containers.

-
-
-

TomEE

-
-

Executing the Arquillian tests with Apache TomEE

+

The DeltaSpike source (modules and examples) is provided for inspection, contribution and testing purposes. The source must be built with Maven, which has been used to automate the compilation, testing and packaging processes. Arquillian tests are automatically conducted when DeltaSpike is built and CDI implementations or containers with which to carry out the tests can be specified.

-
-
-
mvn clean install -Ptomee-build-managed
-
-
-
-
-

JBoss AS7

-
-
Without existing AS7
-
-

Executing the Arquillian tests with JBoss AS7 (without AS7 installation)

-
-
-
-
mvn clean install -Pjbossas-build-managed-7
-
-
-
-
-
With existing AS7
-

Set JBoss_HOME

+

In all cases, to obtain the DeltaSpike source, download deltaspike-project-<version>-source-release.zip and extract the contents.

-

Executing the Arquillian tests with JBoss AS7 (AS7 installation -required)

+

Note: You can also obtain the DeltaSpike source from the project Git repository. The repository is subject to change and it can be used for contributing but should not be used in production environments. For more information, see Get Source and compile it.

-
-
-
mvn clean install -Pjbossas-managed-7
-
-
-
-

WildFly 8

-
-
Without existing WF8
+
+

Build without CDI Implementation Tests

+
-

Executing the Arquillian tests with JBoss-WF8 (without WF8 installation)

+

DeltaSpike can be built without executing tests against a CDI implementation, with the following commands:

-
mvn clean install -Pwildfly-build-managed
+
$ cd /path/to/deltaspike-project-<version>/
+$ mvn clean install
-
-
With existing WF8
-
-

Set WILDFLY_HOME

+
+

Build and Test with a CDI Implementation

+
-

Executing the Arquillian tests with JBoss-WF8 (WF8 installation -required)

-
-
-
-
mvn clean install -Pwildfly-managed
-
+

Tests can be executed with both the JBoss Weld and Apache OpenWebBeans CDI implementations.

+ + ++++ + + + + + + + + + + + + + + + + +
Table 1. Build Tests
ContainerCommand to Execute Arquillian Tests

JBoss Weld

+
+
$ mvn clean install -PWeld
+
+

Apache OpenWebBeans

+
+
$ mvn clean install -POWB
+
+
-
-

GlassFish 3.1

-
-
Without existing GF3
+
+

Build and Test with CDI Containers

+
-

Executing the Arquillian tests with GF3 (without GF3 installation)

-
-
-
-
mvn clean install -Pglassfish-build-managed-3
+

Tests can be executed with JBoss Weld and Apache OpenWebBeans through Java EE 6+ application servers and containers. Configurations are currently provided as details in the table here.

-
-
-
-
With existing GF3
-
+ + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 2. Integration Tests
ContainerCommand to Execute Arquillian Tests

Apache TomEE

+
+
$ mvn clean install -Ptomee-build-managed
+
+

JBoss AS7 (without AS7 installation)

+
+
$ mvn clean install -Pjbossas-build-managed-7
+
+

JBoss AS7 (AS7 installation required)

+

Set JBoss_HOME

+
+
+
+
$ mvn clean install -Pjbossas-managed-7
+
+

JBoss WildFly 8 (without WildFly 8 installation)

+
+
mvn clean install -Pwildfly-build-managed
+
+

JBoss WildFly 8 (WildFly 8 installation required)

+

Set WILDFLY_HOME

+
+
+
+
$ mvn clean install -Pwildfly-managed
+
+

Oracle GlassFish 3 (without GlassFish 3 installation)

+
+
mvn clean install -Pglassfish-build-managed-3
+
+

Oracle GlassFish 3.1 (GlassFish 3.1 installation required)

Install GlassFish (default setup without admin-password) and start -GlassFish with asadmin start-domain and asadmin start-database

-
-
-

Executing the Arquillian tests with Oracle Glassfish 3.1+

+GlassFish with asadmin start-domain and asadmin start-database.

-
mvn clean install -Pglassfish-remote-3.1
-
-
-
- -
-

GlassFish 4

-
-
Without existing GF4
-
-

Executing the Arquillian tests with GF4 (without GF4 installation)

+
$ mvn clean install -Pglassfish-remote-3.1
-
+

Oracle GlassFish 4 (without Oracle GlassFish 4 installation)

-
mvn clean install -Pglassfish-build-managed-4
-
-
-
+
mvn clean install -Pglassfish-build-managed-4
-
-

WebLogic 12c

-
-

Install WebLogic 12c. Start Confiuration Wizard to create a new basic +

Oracle WebLogic 12c

+

Install WebLogic 12c. Start Configuration Wizard to create a new basic WebLogic Domain. Default options and domain name = base_domain, administrator user name = weblogic1, administrator password = weblogic1. -Set WLS_HOME so that %WLS_HOME%.jar exists. Start the domain.

-
-
-

Executing the Arquillian tests with Oracle WebLogic 12c

+Set WLS_HOME so that %WLS_HOME%.jar exists. Start the domain.

-
mvn clean install -Pwls-remote-12c
-
+
$ mvn clean install -Pwls-remote-12c
+
- -
-

Sonar

- +
+

Next

+
+
+
Modified: deltaspike/site/trunk/content/documentation/staging/index.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/staging/index.html?rev=1635230&r1=1635229&r2=1635230&view=diff ============================================================================== --- deltaspike/site/trunk/content/documentation/staging/index.html (original) +++ deltaspike/site/trunk/content/documentation/staging/index.html Wed Oct 29 17:59:55 2014 @@ -170,912 +170,106 @@ body {
- +
-
-

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 :

-
+
+
    +
  • +

    Getting Started

    -
    -

    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 download all JARs described above or you get the source-code and build 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.3</deltaspike.version>
-</properties>
-
-
-
-

Or if you want to very bleeding edge, point to our current snapshot.

-
-
-
-
<properties>
-    <deltaspike.version>1.0.4-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, Apache OpenWebbeans (and -Apache OpenEJB)) and implementation contains -the code to manage the CDI container and contexts.

-
-
-

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 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.

-
-
-
-
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 not automatically start all CDI -Contexts!

-
-
-

Example for starting the application-context:

-
-
-
-
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).

-
-
-
-
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

-
-View details » -
-
-

Security (optional)

-
-

Definition : Intercept and check security

-
-View details » -
-
-

JPA (optional)

-
-

Definition :

-
-View details » -
-
-

JSF (optional)

-
-

Definition :

-
-View details » -
-
-

Container Control (optional)

-
-

Definition :

-
-View details » -
-
-

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.

-
-View details » -
-
-

Servlet (optional)

-
-

Definition : The DeltaSpike Servlet module provides integration with the -Java Servlet API.

-
-
-

Features :

-
+ +
  • +

    Using Individual Modules

    • -

      Injection of common servlet objects.

      +

      Core

    • -

      Propagation of servlet events to the CDI event bus.

      +

      Bean Validation

    • -
    -
    -View details » -
  • -
    -

    Partial-Bean (optional)

    -View details » -
    -
    -

    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

      +

      Container Control

    • -

      Result pagination and sorting

      +

      Data

    • -

      Auditing of entities

      +

      JPA

    • -

      A simplified alternative to the Criteria API

      +

      JSF

    • -

      Mapping of entities from and to DTOs

      +

      Partial-Bean

      +
    • +
    • +

      Scheduler

      +
    • +
    • +

      Security

    • -
    -
    -View details » -
    -
    -

    Test-Control (optional)

    -
    -

    Definition : This module allows to write CDI based tests easily.

    -
    -View details » -
    -
    -

    Scheduler (optional)

    -
    -

    Definition : This module provides a simple integration with Quartz v2 -(per default) or any other scheduler which supports cron-expressions for -job-classes.

    -
    -View details » -
    -
    -
    -
    -

    DeltaSpike SPI

    -
    -
    -

    DeltaSpike Service Provider Interface (SPI)

    -
    -View details » -
    -
    -