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 4CFF917D0A for ; Thu, 16 Oct 2014 16:05:31 +0000 (UTC) Received: (qmail 93065 invoked by uid 500); 16 Oct 2014 16:05:31 -0000 Delivered-To: apmail-deltaspike-commits-archive@deltaspike.apache.org Received: (qmail 92978 invoked by uid 500); 16 Oct 2014 16:05:31 -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 92961 invoked by uid 99); 16 Oct 2014 16:05:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Oct 2014 16:05:31 +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; Thu, 16 Oct 2014 16:05:26 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CA390238899C; Thu, 16 Oct 2014 16:05:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1632371 [1/10] - in /deltaspike/site/trunk/content/documentation/staging: ./ releasenotes/ Date: Thu, 16 Oct 2014 16:05:04 -0000 To: commits@deltaspike.apache.org From: rafabene@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141016160505.CA390238899C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rafabene Date: Thu Oct 16 16:05:03 2014 New Revision: 1632371 URL: http://svn.apache.org/r1632371 Log: Site checkin for project Apache DeltaSpike - Documentation Added: deltaspike/site/trunk/content/documentation/staging/addons.html deltaspike/site/trunk/content/documentation/staging/articles.html deltaspike/site/trunk/content/documentation/staging/bean-validation.html deltaspike/site/trunk/content/documentation/staging/build.html deltaspike/site/trunk/content/documentation/staging/cdiimp.html deltaspike/site/trunk/content/documentation/staging/configuration.html deltaspike/site/trunk/content/documentation/staging/configure.html deltaspike/site/trunk/content/documentation/staging/container-control.html deltaspike/site/trunk/content/documentation/staging/core.html deltaspike/site/trunk/content/documentation/staging/data.html deltaspike/site/trunk/content/documentation/staging/deltaspike_1.0.2.html deltaspike/site/trunk/content/documentation/staging/deltaspike_1.0.3.html deltaspike/site/trunk/content/documentation/staging/examples.html deltaspike/site/trunk/content/documentation/staging/external.html deltaspike/site/trunk/content/documentation/staging/index.html deltaspike/site/trunk/content/documentation/staging/jpa.html deltaspike/site/trunk/content/documentation/staging/jsf.html deltaspike/site/trunk/content/documentation/staging/overview.html deltaspike/site/trunk/content/documentation/staging/partial-bean.html deltaspike/site/trunk/content/documentation/staging/projectstage.html deltaspike/site/trunk/content/documentation/staging/releasenotes/ deltaspike/site/trunk/content/documentation/staging/scheduler.html deltaspike/site/trunk/content/documentation/staging/security.html deltaspike/site/trunk/content/documentation/staging/servlet.html deltaspike/site/trunk/content/documentation/staging/snapshots.html deltaspike/site/trunk/content/documentation/staging/source.html deltaspike/site/trunk/content/documentation/staging/spi.html deltaspike/site/trunk/content/documentation/staging/test-control.html Added: deltaspike/site/trunk/content/documentation/staging/addons.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/staging/addons.html?rev=1632371&view=auto ============================================================================== --- deltaspike/site/trunk/content/documentation/staging/addons.html (added) +++ deltaspike/site/trunk/content/documentation/staging/addons.html Thu Oct 16 16:05:03 2014 @@ -0,0 +1,278 @@ + + + + + + + + + +Add-ons + + + + + + + + + + + + + + + + +
+
+
+
+

Add-ons

+
+ +
+ +
+ +
+
+
+

Add-ons extend the functionality of DeltaSpike and several have been developed external to the DeltaSpike project. Brief information is given here about each of the add-ons, with details of where they can be obtained from.

+
+
+
+
+

Monitoring

+
+
+

Replace this text! Write 2-3 sentences in plain language making sure you answer every question:

+
+
+
    +
  • +

    What is the purpose of the add-on (e.g., A two-way cdi-spring bridge that allows spring-beans to be injected into cdi-beans and vice versa provided the concepts, for example qualifiers, are compatible.)?

    +
  • +
  • +

    When would the user use this add-on?

    +
  • +
  • +

    Where can the user get the add-on from (https://github.com/os890/ds-monitoring-addon )?

    +
  • +
  • +

    Any special instructions for using the add-on correctly?

    +
  • +
+
+
+
+
+

Spring Bridge

+
+
+

ds-spring-bridge-addon is a two-way cdi-spring bridge that allows spring-beans to be injected into cdi-beans and vice versa provided the concepts, for example qualifiers, are compatible. You can obtain this add-on from https://github.com/os890/ds-spring-bridge-addon.

+
+
+

Replace this text! Write 2-3 sentences in plain language making sure you answer every question:

+
+
+
    +
  • +

    What is the purpose of the add-on (e.g., A two-way cdi-spring bridge that allows spring-beans to be injected into cdi-beans and vice versa provided the concepts, for example qualifiers, are compatible.)?

    +
  • +
  • +

    When would the user use this add-on?

    +
  • +
  • +

    Where can the user get the add-on from (https://github.com/os890/ds-spring-bridge-addon )?

    +
  • +
  • +

    Any special instructions for using the add-on correctly?

    +
  • +
+
+
+
+
+

Disruptor

+
+
+

This add-on creates a disruptor process for every observer method. It currently works with Apache TomEE and JBoss AS 7.

+
+
+

Replace this text! Write 2-3 sentences in plain language making sure you answer every question:

+
+
+
    +
  • +

    What is the purpose of the add-on (e.g., A two-way cdi-spring bridge that allows spring-beans to be injected into cdi-beans and vice versa provided the concepts, for example qualifiers, are compatible.)?

    +
  • +
  • +

    When would the user use this add-on?

    +
  • +
  • +

    Where can the user get the add-on from (https://github.com/os890/ds-disruptor-addon )?

    +
  • +
  • +

    Any special instructions for using the add-on correctly?

    +
  • +
+
+
+
+
+ +
+ +
+

Copyright © 2011-2014 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.

+

Apache and the Apache feather logo are trademarks of The Apache Software Foundation.

+
+ +
+ + + + \ No newline at end of file Added: deltaspike/site/trunk/content/documentation/staging/articles.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/staging/articles.html?rev=1632371&view=auto ============================================================================== --- deltaspike/site/trunk/content/documentation/staging/articles.html (added) +++ deltaspike/site/trunk/content/documentation/staging/articles.html Thu Oct 16 16:05:03 2014 @@ -0,0 +1,259 @@ + + + + + + + + + +Articles and Blogs + + + + + + + + + + + + + + + + +
+
+
+
+

Articles and Blogs

+
+ +
+ +
+ +
+
+
+

You can find lots of content related to DeltaSpike with a quick internet search. But here is a list of some useful articles and blogs to get you started.

+
+
+

If you know of useful DeltaSpike articles or blogs that are not listed, let us know.

+
+
+
+ + +
+ +
+ +
+

Copyright © 2011-2014 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.

+

Apache and the Apache feather logo are trademarks of The Apache Software Foundation.

+
+ +
+ + + + \ No newline at end of file Added: deltaspike/site/trunk/content/documentation/staging/bean-validation.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/staging/bean-validation.html?rev=1632371&view=auto ============================================================================== --- deltaspike/site/trunk/content/documentation/staging/bean-validation.html (added) +++ deltaspike/site/trunk/content/documentation/staging/bean-validation.html Thu Oct 16 16:05:03 2014 @@ -0,0 +1,244 @@ + + + + + + + + + +Bean Validation Module + + + + + + + + + + + + + + + + +
+
+
+
+

Bean Validation Module

+
+ +
+ +
+ +
+

Introduction

+
+
+

The main feature of the Bean Validation module is to provide CDI +integration in to ConstraintValidator `s. This allows you to inject CDI +objects, EJBs etc in to your validators.

+
+
+

Scoping

+
+

ConstraintValidator `s will inherit whatever scope as defined in the bean class.

+
+
+

Inherently, a ConstraintValidator may be invoked by multiple threads so please keep that in mind when using them. +You should consider using at least RequestScoped validators.

+
+
+
+

Code Requirements

+
+

There are no compile dependencies to use the Bean Validation module. You +simply need to override the factory, either in Java:

+
+
+
+
Validation.byDefaultProvider().configure().constraintValidatorFactory(new CDIAwareConstraintValidatorFactory()).buildValidatorFactory()
+
+
+
+

Or in XML:

+
+
+
+
<validation-config xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configuration">
+    <constraint-validator-factory>org.apache.deltaspike.beanvalidation.impl.CDIAwareConstraintValidatorFactory</constraint-validator-factory>
+</validation-config>
+
+
+
+

And then you can simply build your `ConstraintValidator`s based on CDI +programming rules.

+
+
+
+
+
+ +
+ +
+

Copyright © 2011-2014 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.

+

Apache and the Apache feather logo are trademarks of The Apache Software Foundation.

+
+ +
+ + + + \ No newline at end of file Added: deltaspike/site/trunk/content/documentation/staging/build.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/staging/build.html?rev=1632371&view=auto ============================================================================== --- deltaspike/site/trunk/content/documentation/staging/build.html (added) +++ deltaspike/site/trunk/content/documentation/staging/build.html Thu Oct 16 16:05:03 2014 @@ -0,0 +1,383 @@ + + + + + + + + + +Build and Test DeltaSpike from Source + + + + + + + + + + + + + + + + +
+
+
+
+

Build and Test DeltaSpike from Source

+
+ +
+ +
+ +
+
+
+

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.

+
+
+

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

+
+
+
+
+

Build without CDI Implementation Tests

+
+
+

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

+
+
+
+
$ cd /path/to/deltaspike-project-<version>/
+$ mvn clean install
+
+
+
+
+
+

Build and Test with a CDI Implementation

+
+
+

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

Build and Test with Remote CDI Containers

+
+
+

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.

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

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

Oracle GlassFish 4 (without Oracle GlassFish 4 installation)

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

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.

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

Next

+
+
+ +
+
+
+
+ +
+ +
+

Copyright © 2011-2014 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.

+

Apache and the Apache feather logo are trademarks of The Apache Software Foundation.

+
+ +
+ + + + \ No newline at end of file Added: deltaspike/site/trunk/content/documentation/staging/cdiimp.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/staging/cdiimp.html?rev=1632371&view=auto ============================================================================== --- deltaspike/site/trunk/content/documentation/staging/cdiimp.html (added) +++ deltaspike/site/trunk/content/documentation/staging/cdiimp.html Thu Oct 16 16:05:03 2014 @@ -0,0 +1,476 @@ + + + + + + + + + +Enable CDI For Your Java Environment + + + + + + + + + + + + + + + + +
+
+
+
+

Enable CDI For Your Java Environment

+
+ +
+ +
+ +
+
+
+

DeltaSpike requires a CDI implementation to be available in the Java environment that your projects are deployed to. The implementation provides the CDI essentials, managing dependency injection and contextual lifecycles. JBoss Weld and Apache OpenWebBeans (OWB) are two widely used CDI implementations. Dependent on the Java environment you choose, some setup may be necessary as detailed here.

+
+
+
+
+

Java EE6+ Containers

+
+
+

CDI is part of Java EE6 and later so CDI implementations are included as standard in Java EE6+ compliant environments. There is no additional CDI configuration needed.

+
+
+

JBoss Weld is integrated in Java EE application servers including WildFly, JBoss Enterprise Application Platform, GlassFish, and Oracle WebLogic.

+
+
+

Apache OpenWebBeans (OWB) is integrated in Java EE containers including Apache TomEE, Apache Geronimo, IBM WebSphere Application Server, and SiwPas.

+
+
+
+
+

Java EE5 and Servlet Containers

+
+
+

CDI implementations are not distributed with Java EE5 application servers or Servlet-only environments such as Apache TomCat and Eclipse Jetty. You can use CDI in these environments by embedding a standalone CDI implementation. Both JBoss Weld and Apache OpenWebBeans can be used for this task; for more information, see the corresponding CDI implementation documentation.

+
+
+
+
+

Java SE6+

+
+
+

CDI is not part of Java SE but it can still be used. JBoss Weld and Apache OpenWebBeans implementations can be used to act as dependency injection bean managers but the respective containers must be booted manually.

+
+
+

DeltaSpike provides a dedicated Container Control module to enable applications deployed in Java SE environments to boot a CDI container. The Container Control module consists of the API component and components specific to the JBoss Weld, Apache OpenWebBeans and Apache OpenEJB CDI containers. The DeltaSpike module provides a layer of abstraction from the specific CDI containers, enabling you to write container-independent code in your project.

+
+
+

Instructions are provided here for adding the required resources to both Maven-based and Maven-independent projects and subsequently booting the CDI container from your project source code.

+
+
+

Declare Dependencies for Maven-based Projects

+
+

For Maven-based projects, the Container Control module is available in Maven Central together with the other DeltaSpike modules. You must configure your project to use the DeltaSpike Container Control API and one of the CDI container-specific modules.

+
+
+
    +
  1. +

    Open the project pom.xml file for editing

    +
  2. +
  3. +

    Add the DeltaSpike Container Control API to the list of dependencies

    +
    +
    +
    <dependency>
    +    <groupId>org.apache.deltaspike.cdictrl</groupId>
    +    <artifactId>deltaspike-cdictrl-api</artifactId>
    +    <version>${deltaspike.version}</version>
    +    <scope>compile</scope>
    +</dependency>
    +
    +
    +
  4. +
  5. +

    Add CDI container dependencies for one of the container options listed here

    +
  6. +
+
+
+

Option A: For JBoss Weld

+
+
    +
  1. +

    Open the project pom.xml file for editing

    +
  2. +
  3. +

    Add the JBoss Weld version to the list of properties, replacing the version as desired

    +
    +
    +
    <properties>
    +    <weld.version>1.1.9.Final</weld.version>
    +</properties>
    +
    +
    +
  4. +
  5. +

    Add the JBoss Weld dependency to the list of dependencies

    +
    +
    +
    <dependency>
    +    <groupId>org.jboss.weld.se</groupId>
    +    <artifactId>weld-se</artifactId>
    +    <version>${weld.version}</version>
    +    <scope>runtime</scope>
    +</dependency>
    +
    +
    +
  6. +
  7. +

    Add the DeltaSpike Weld-specific Container Control module to the list of dependencies

    +
    +
    +
    <dependency>
    +    <groupId>org.apache.deltaspike.cdictrl</groupId>
    +    <artifactId>deltaspike-cdictrl-weld</artifactId>
    +    <version>${deltaspike.version}</version>
    +    <scope>runtime</scope>
    +</dependency>
    +
    +
    +
  8. +
  9. +

    Save the pom.xml file changes

    +
  10. +
  11. +

    Download all required dependencies

    +
    +
    +
    mvn clean install
    +
    +
    +
  12. +
+
+
+
+

Option B: For Apache OpenWebBeans

+
+
    +
  1. +

    Open the project pom.xml file for editing

    +
  2. +
  3. +

    Add the Apache OpenWebBeans version to the list of properties, replacing the version as desired

    +
    +
    +
    <properties>
    +    <owb.version>1.2.0</owb.version>
    +</properties>
    +
    +
    +
  4. +
  5. +

    Add the Apache OpenWebBeans dependencies to the list of dependencies

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

    Add the DeltaSpike Apache OpenWebBeans-specific Container Control module to the list of dependencies

    +
    +
    +
    <dependency>
    +    <groupId>org.apache.deltaspike.cdictrl</groupId>
    +    <artifactId>deltaspike-cdictrl-owb</artifactId>
    +    <version>${deltaspike.version}</version>
    +    <scope>runtime</scope>
    +</dependency>
    +
    +
    +
  8. +
  9. +

    Save the pom.xml file changes

    +
  10. +
  11. +

    Download all required dependencies

    +
    +
    +
    mvn clean install
    +
    +
    +
  12. +
+
+
+
+
+

Declare Dependencies for Maven-independent Projects

+
+

For Maven-independent projects, the Container Control module is distributed together with the other DeltaSpike modules in distribution-fill-<version>.zip. You must add two of the files from the cdictrl directory to your project, namely deltaspike-cdictrl-api.jar and the .jar file that corresponds to the CDI container you have chosen. Add these files to the project WEB-INF/lib or EAR/lib directory for .war and .ear projects respectively.

+
+
+
+

Start the CDI Container from Your Project

+
+

To start a CDI container in your application, you must instantiate a CdiContainer object and call the #boot method. When #boot is called, the CdiContainer scans CDI-enabled +archives for beans and CDI extensions. An example is given in the code snippet here. Before the application exits, #shutdown must be called to correctly destroy all beans.

+
+
+
+
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();
+    }
+}
+
+
+
+

Starting the container does not automatically start all CDI Contexts. Contexts must be started independently using the provided ContextControl class. An example of starting the Context for @ApplicationScoped beans is added to the code snippet here.

+
+
+
+
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 project beans, you can use the DeltaSpike BeanProvider class. Whether EchoService is a concrete implementation or just an interface depends on the application. In the case that it is an interface, the corresponding implementation is resolved. The resolved bean is a standard CDI bean and it can be used for all CDI concepts, such as @Inject, in the class without further uses of BeanProvider. An example of resolving the bean without qualifiers is given in the code snippet here.

+
+
+
+
EchoService echoService = BeanProvider.getContextualReference(EchoService.class, false);
+
+
+
+
+
+
+

Next

+
+
+ +
+
+
+
+ +
+ +
+

Copyright © 2011-2014 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.

+

Apache and the Apache feather logo are trademarks of The Apache Software Foundation.

+
+ +
+ + + + \ No newline at end of file