From 045bad532d3073a586f77f768921a83fc094f353 Mon Sep 17 00:00:00 2001 From: Rafael Benevides Date: Wed, 15 Oct 2014 10:17:24 -0300 Subject: [PATCH] Michelle's documentation refactoring - squashed changes --- documentation/pom.xml | 2 +- .../src/main/asciidoc/bean-validation.adoc | 2 +- documentation/src/main/asciidoc/build.adoc | 245 +++--- .../src/main/asciidoc/configuration.adoc | 3 +- .../src/main/asciidoc/container-control.adoc | 2 +- documentation/src/main/asciidoc/core.adoc | 2 +- documentation/src/main/asciidoc/data.adoc | 2 +- documentation/src/main/asciidoc/index.adoc | 751 +----------------- documentation/src/main/asciidoc/jpa.adoc | 3 +- documentation/src/main/asciidoc/jsf.adoc | 3 +- .../src/main/asciidoc/partial-bean.adoc | 2 +- .../src/main/asciidoc/projectstage.adoc | 4 +- .../src/main/asciidoc/scheduler.adoc | 2 +- documentation/src/main/asciidoc/security.adoc | 2 +- documentation/src/main/asciidoc/servlet.adoc | 2 +- documentation/src/main/asciidoc/source.adoc | 2 +- documentation/src/main/asciidoc/spi.adoc | 4 +- .../src/main/asciidoc/test-control.adoc | 2 +- .../src/main/template/document.html.erb | 4 +- 19 files changed, 153 insertions(+), 886 deletions(-) diff --git a/documentation/pom.xml b/documentation/pom.xml index 47353f064..9b9d09e7f 100644 --- a/documentation/pom.xml +++ b/documentation/pom.xml @@ -36,7 +36,7 @@ 1.5.0 - https://svn.apache.org/repos/asf/deltaspike/site/trunk/content/documentation/ + https://svn.apache.org/repos/asf/deltaspike/site/trunk/content/documentation/staging/ ${project.build.directory}/co-site diff --git a/documentation/src/main/asciidoc/bean-validation.adoc b/documentation/src/main/asciidoc/bean-validation.adoc index e756824b8..bddfd98a5 100644 --- a/documentation/src/main/asciidoc/bean-validation.adoc +++ b/documentation/src/main/asciidoc/bean-validation.adoc @@ -2,7 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[TOC] +:toc: == Introduction diff --git a/documentation/src/main/asciidoc/build.adoc b/documentation/src/main/asciidoc/build.adoc index 48fb04b28..08e148030 100644 --- a/documentation/src/main/asciidoc/build.adoc +++ b/documentation/src/main/asciidoc/build.adoc @@ -1,155 +1,128 @@ -= Building DeltaSpike from source += Build and Test DeltaSpike from Source :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[TOC] - -== Introduction - -Deltaspike uses http://maven.apache.org/[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* - ---------------------------------------- -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 - -*Executing the Arquillian tests with JBoss AS7 (AS7 installation -required)* - -------------------------------------- -mvn clean install -Pjbossas-managed-7 -------------------------------------- - - -==== WildFly 8 - - -===== Without existing WF8 - - -*Executing the Arquillian tests with JBoss-WF8 (without WF8 installation)* - ------------------------------------------ +:toc: + +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, link:https://deltaspike.apache.org/download.html[download `deltaspike-project--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: + +[source,shell] +---- +$ cd /path/to/deltaspike-project-/ +$ mvn clean install +---- + +== Build and Test with a CDI Implementation +Tests can be executed with both the JBoss Weld and Apache OpenWebBeans CDI implementations. + +[cols="1,2a", options="header"] +.Build Tests +|=== +|Container |Command to Execute Arquillian Tests + +|JBoss Weld +| +[source,shell] +---- +$ mvn clean install -PWeld +---- + +|Apache OpenWebBeans +| +[source,shell] +---- +$ 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. + +[cols="2,3a", options="header"] +.Integration Tests +|=== +|Container |Command to Execute Arquillian Tests + +|Apache TomEE +| +[source,shell] +---- +$ mvn clean install -Ptomee-build-managed +---- + +|JBoss AS7 (without AS7 installation) +| +[source,shell] +---- +$ mvn clean install -Pjbossas-build-managed-7 +---- + +|JBoss AS7 (AS7 installation required) +|Set `JBoss_HOME` + +[source,shell] +---- +$ mvn clean install -Pjbossas-managed-7 +---- + +|JBoss WildFly 8 (without WildFly 8 installation) +| +[source,shell] +---- mvn clean install -Pwildfly-build-managed ------------------------------------------ - - -===== With existing WF8 - - -Set WILDFLY_HOME - -*Executing the Arquillian tests with JBoss-WF8 (WF8 installation -required)* - ------------------------------------ -mvn clean install -Pwildfly-managed ------------------------------------ - - -==== GlassFish 3.1 - - +---- -===== Without existing GF3 +|JBoss WildFly 8 (WildFly 8 installation required) +|Set `WILDFLY_HOME` -*Executing the Arquillian tests with GF3 (without GF3 installation)* +[source,shell] +---- +$ mvn clean install -Pwildfly-managed +---- ---------------------------------------------- +|Oracle GlassFish 3 (without GlassFish 3 installation) +| +[source,shell] +---- 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`. -===== With existing GF3 +[source,shell] +---- +$ mvn clean install -Pglassfish-remote-3.1 +---- -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+* - ----------------------------------------- -mvn clean install -Pglassfish-remote-3.1 ----------------------------------------- - - -==== GlassFish 4 - -===== Without existing GF4 - -*Executing the Arquillian tests with GF4 (without GF4 installation)* - ---------------------------------------------- +|Oracle GlassFish 4 (without Oracle GlassFish 4 installation) +| +[source,shell] +---- 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* - ----------------------------------- -mvn clean install -Pwls-remote-12c ----------------------------------- - - -=== Jenkins Builds +Set `WLS_HOME` so that `%WLS_HOME%.jar` exists. Start the domain. -https://builds.apache.org/view/A-D/view/DeltaSpike/ +[source,shell] +---- +$ mvn clean install -Pwls-remote-12c +---- +|=== -=== Sonar +== Next +* For analysis of the DeltaSpike source, see https://analysis.apache.org/dashboard/index/org.apache.deltaspike:deltaspike-project +* For information about DeltaSpike automated Jenkins builds, see https://builds.apache.org/view/A-D/view/DeltaSpike/ -https://analysis.apache.org/dashboard/index/org.apache.deltaspike:deltaspike-project diff --git a/documentation/src/main/asciidoc/configuration.adoc b/documentation/src/main/asciidoc/configuration.adoc index 7f3e1142b..2e2107ba6 100644 --- a/documentation/src/main/asciidoc/configuration.adoc +++ b/documentation/src/main/asciidoc/configuration.adoc @@ -2,8 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - -[TOC] +:toc: == Configuration Basics diff --git a/documentation/src/main/asciidoc/container-control.adoc b/documentation/src/main/asciidoc/container-control.adoc index 0298553d9..0fdc767f6 100644 --- a/documentation/src/main/asciidoc/container-control.adoc +++ b/documentation/src/main/asciidoc/container-control.adoc @@ -2,7 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[TOC] +:toc: == Introduction diff --git a/documentation/src/main/asciidoc/core.adoc b/documentation/src/main/asciidoc/core.adoc index 043eee594..0dcb4c659 100644 --- a/documentation/src/main/asciidoc/core.adoc +++ b/documentation/src/main/asciidoc/core.adoc @@ -2,7 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[TOC] +:toc: == Core - API diff --git a/documentation/src/main/asciidoc/data.adoc b/documentation/src/main/asciidoc/data.adoc index 022322c2e..1f069f9f8 100644 --- a/documentation/src/main/asciidoc/data.adoc +++ b/documentation/src/main/asciidoc/data.adoc @@ -2,7 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[TOC] +:toc: == Introduction diff --git a/documentation/src/main/asciidoc/index.adoc b/documentation/src/main/asciidoc/index.adoc index 05e0206b3..2d4d04b25 100644 --- a/documentation/src/main/asciidoc/index.adoc +++ b/documentation/src/main/asciidoc/index.adoc @@ -2,728 +2,29 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[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 download all JARs described above or you get <> and <> 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: - -[source,xml] --------------------------------------------------- - - 1.0.3 - --------------------------------------------------- - -Or if you want to very bleeding edge, point to our current snapshot. - -[source,xml] ------------------------------------------------------------ - - 1.0.4-SNAPSHOT - ------------------------------------------------------------ - -==== Configuration of DeltaSpike Core - -[source,xml] -------------------------------------------------- - - org.apache.deltaspike.core - deltaspike-core-api - ${deltaspike.version} - compile - - - - org.apache.deltaspike.core - deltaspike-core-impl - ${deltaspike.version} - runtime - -------------------------------------------------- - -==== Configuration of DeltaSpike Modules - -Security Module -+++++++++++++++ - -[source,xml] ------------------------------------------------------------- - - org.apache.deltaspike.modules - deltaspike-security-module-api - ${deltaspike.version} - compile - - - - org.apache.deltaspike.modules - deltaspike-security-module-impl - ${deltaspike.version} - runtime - ------------------------------------------------------------- - -===== JPA Module - -[source,xml] -------------------------------------------------------- - - org.apache.deltaspike.modules - deltaspike-jpa-module-api - ${deltaspike.version} - compile - - - - org.apache.deltaspike.modules - deltaspike-jpa-module-impl - ${deltaspike.version} - runtime - -------------------------------------------------------- - -===== JSF Module - -[source,xml] -------------------------------------------------------- - - org.apache.deltaspike.modules - deltaspike-jsf-module-api - ${deltaspike.version} - compile - - - - org.apache.deltaspike.modules - deltaspike-jsf-module-impl - ${deltaspike.version} - runtime - -------------------------------------------------------- - -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: - -[source,xml] ------------------------------------------------------------ - - org.apache.deltaspike.modules - deltaspike-jsf-module-impl-ee6 - ${deltaspike.version} - runtime - ------------------------------------------------------------ - -===== Bean Validation Module - -[source,xml] -------------------------------------------------------------------- - - org.apache.deltaspike.modules - deltaspike-bean-validation-module-impl - ${deltaspike.version} - runtime - -------------------------------------------------------------------- - -===== Servlet Module - -[source,xml] ------------------------------------------------------------ - - org.apache.deltaspike.modules - deltaspike-servlet-module-api - ${deltaspike.version} - compile - - - - org.apache.deltaspike.modules - deltaspike-servlet-module-impl - ${deltaspike.version} - runtime - ------------------------------------------------------------ - -===== Data Module - -[source,xml] --------------------------------------------------------- - - org.apache.deltaspike.modules - deltaspike-data-module-api - ${deltaspike.version} - compile - - - - org.apache.deltaspike.modules - deltaspike-data-module-impl - ${deltaspike.version} - runtime - --------------------------------------------------------- - -===== Test-Control Module - -[source,xml] ----------------------------------------------------------------- - - org.apache.deltaspike.modules - deltaspike-test-control-module-api - ${deltaspike.version} - test - - - - org.apache.deltaspike.modules - deltaspike-test-control-module-impl - ${deltaspike.version} - test - ----------------------------------------------------------------- - -===== Scheduler Module - -[source,xml] -------------------------------------------------------------- - - org.apache.deltaspike.modules - deltaspike-scheduler-module-api - ${deltaspike.version} - compile - - - - org.apache.deltaspike.modules - deltaspike-scheduler-module-impl - ${deltaspike.version} - runtime - -------------------------------------------------------------- - -==== 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 -(http://docs.jboss.org/weld/reference/1.1.5.Final/en-US/html/[JBoss -Weld], http://openwebbeans.apache.org[Apache OpenWebbeans] (and -http://openejb.apache.org[Apache OpenEJB])) and implementation contains -the code to manage the link:#_container_control_optional[CDI container and contexts]. - -*Hint:* In the listings below replace the placeholders for the version -with the version of your choice or use: - -[source,xml] --------------------------------------------------- - - 1.0.0 - 1.2.0 - 1.1.9.Final - --------------------------------------------------- - -===== Add the DeltaSpike Container Ctrl API - -[source,xml] ----------------------------------------------------- - - org.apache.deltaspike.cdictrl - deltaspike-cdictrl-api - ${deltaspike.version} - compile - ----------------------------------------------------- - -===== Add a CDI container + Container Ctrl Impl - - -==== ... for Apache OpenWebBeans - - -[source,xml] ----------------------------------------------------- - - org.apache.openwebbeans - openwebbeans-impl - ${owb.version} - runtime - - - - org.apache.openwebbeans - openwebbeans-spi - ${owb.version} - compile - - - - org.apache.deltaspike.cdictrl - deltaspike-cdictrl-owb - ${deltaspike.version} - runtime - ----------------------------------------------------- - -==== ... for JBoss Weld (RI) - - -[source,xml] ----------------------------------------------------- - - org.apache.deltaspike.cdictrl - deltaspike-cdictrl-weld - ${deltaspike.version} - runtime - - - - org.jboss.weld.se - weld-se - ${weld.version} - runtime - ----------------------------------------------------- - -==== For Embedded Servlet Runtimes, you can add - - -[source,xml] -------------------------------------------------------- - - org.apache.deltaspike.cdictrl - deltaspike-cdictrl-servlet - ${deltaspike.version} - compile - -------------------------------------------------------- - -==== Testing Snapshots - - -If you would like to test the latest Snapshot, you can <> DeltaSpike locally or you -get it from the Apache Snapshot-Repository: - -[source,xml] ----------------------------------------------------------- - - - apache-snapshot-repository - http://repository.apache.org/snapshots/ - - false - - - true - - - ----------------------------------------------------------- - -== 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. - -[source,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 not automatically start all CDI -Contexts! - -Example for starting the application-context: - -[source,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`). - -[source,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 - -++++++++++++++++ -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 : - -* Injection of common servlet objects. -* Propagation of servlet events to the CDI event bus. - -++++++++++++++++ -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 -* Result pagination and sorting -* Auditing of entities -* A simplified alternative to the Criteria API -* Mapping of entities from and to DTOs - -++++++++++++++++ -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 » -++++++++++++++++ - - -== External - -=== Blogs - -* http://os890.blogspot.com/search/label/deltaspike - - -=== Add-ons - -* https://github.com/os890/ds-monitoring-addon[Monitoring- and Auditing] -* https://github.com/os890/ds-spring-bridge-addon[CDI/Spring Bridge] -* https://github.com/os890/ds-disruptor-addon[Fast events via Disruptor] - -=== Project Templates - -* https://github.com/os890/javase-cdi-ds-project-template[Java SE + CDI + DS] -* https://github.com/os890/javaweb-cdi-ds-project-template[JSF + CDI + DS (Servlet-Container)] -* https://github.com/os890/javaee_cdi_ejb_ds_project_template[EJB + CDI + DS (Module)] -* https://github.com/os890/javaee_jsf_cdi_ejb_ds_project_template[JSF + EJB + CDI + DS (EE-Server)] - -=== Examples - -See link:../examples.html#External[External Examples] +* Getting Started +** <> +** <> +** <> +** <> +* Using Individual Modules +** <> +** <> +** <> +** <> +** <> +** <> +** <> +** <> +** <> +** <> +** <> +* Advanced Information +** <> +** <> +** link:https://deltaspike.apache.org/migration-guide.html[Migrate to DeltaSpike] +** <> +* More Resources +** <> +** <> +** <> diff --git a/documentation/src/main/asciidoc/jpa.adoc b/documentation/src/main/asciidoc/jpa.adoc index 44ebad689..c5bf956e6 100644 --- a/documentation/src/main/asciidoc/jpa.adoc +++ b/documentation/src/main/asciidoc/jpa.adoc @@ -2,8 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[TOC] - +:toc: == @Transactional diff --git a/documentation/src/main/asciidoc/jsf.adoc b/documentation/src/main/asciidoc/jsf.adoc index 41e647d0e..451d2571e 100644 --- a/documentation/src/main/asciidoc/jsf.adoc +++ b/documentation/src/main/asciidoc/jsf.adoc @@ -2,8 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[TOC] - +:toc: == Multi-Window Handling diff --git a/documentation/src/main/asciidoc/partial-bean.adoc b/documentation/src/main/asciidoc/partial-bean.adoc index e15b270be..e89ab0003 100644 --- a/documentation/src/main/asciidoc/partial-bean.adoc +++ b/documentation/src/main/asciidoc/partial-bean.adoc @@ -2,7 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[TOC] +:toc: == Usage diff --git a/documentation/src/main/asciidoc/projectstage.adoc b/documentation/src/main/asciidoc/projectstage.adoc index 8419c77b6..224521cc3 100644 --- a/documentation/src/main/asciidoc/projectstage.adoc +++ b/documentation/src/main/asciidoc/projectstage.adoc @@ -2,9 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - -[TOC] - +:toc: == Introduction diff --git a/documentation/src/main/asciidoc/scheduler.adoc b/documentation/src/main/asciidoc/scheduler.adoc index 586357b46..bf097e3d6 100644 --- a/documentation/src/main/asciidoc/scheduler.adoc +++ b/documentation/src/main/asciidoc/scheduler.adoc @@ -2,7 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[TOC] +:toc: == Intro diff --git a/documentation/src/main/asciidoc/security.adoc b/documentation/src/main/asciidoc/security.adoc index 6d8a51553..6ab683337 100644 --- a/documentation/src/main/asciidoc/security.adoc +++ b/documentation/src/main/asciidoc/security.adoc @@ -2,7 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[TOC] +:toc: == Hint diff --git a/documentation/src/main/asciidoc/servlet.adoc b/documentation/src/main/asciidoc/servlet.adoc index 7fe2d761a..61e530f9f 100644 --- a/documentation/src/main/asciidoc/servlet.adoc +++ b/documentation/src/main/asciidoc/servlet.adoc @@ -2,7 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[TOC] +:toc: == Configuration diff --git a/documentation/src/main/asciidoc/source.adoc b/documentation/src/main/asciidoc/source.adoc index 003923330..aa80103a8 100644 --- a/documentation/src/main/asciidoc/source.adoc +++ b/documentation/src/main/asciidoc/source.adoc @@ -2,7 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[TOC] +:toc: == Introduction diff --git a/documentation/src/main/asciidoc/spi.adoc b/documentation/src/main/asciidoc/spi.adoc index 80faf81c7..3b8f63c46 100644 --- a/documentation/src/main/asciidoc/spi.adoc +++ b/documentation/src/main/asciidoc/spi.adoc @@ -2,9 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - -[TOC] - +:toc: == Introduction diff --git a/documentation/src/main/asciidoc/test-control.adoc b/documentation/src/main/asciidoc/test-control.adoc index ba6cbc5ba..d1ff0c5d5 100644 --- a/documentation/src/main/asciidoc/test-control.adoc +++ b/documentation/src/main/asciidoc/test-control.adoc @@ -2,7 +2,7 @@ :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -[TOC] +:toc: == Intro diff --git a/documentation/src/main/template/document.html.erb b/documentation/src/main/template/document.html.erb index 92ef9ff17..3b04a6068 100644 --- a/documentation/src/main/template/document.html.erb +++ b/documentation/src/main/template/document.html.erb @@ -13,8 +13,8 @@ - - + +