deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rafab...@apache.org
Subject svn commit: r1624296 [1/7] - /deltaspike/site/trunk/content/documentation/
Date Thu, 11 Sep 2014 14:16:38 GMT
Author: rafabene
Date: Thu Sep 11 14:16:37 2014
New Revision: 1624296

URL: http://svn.apache.org/r1624296
Log:
Site checkin for project Apache DeltaSpike - Documentation

Added:
    deltaspike/site/trunk/content/documentation/bean-validation.html
    deltaspike/site/trunk/content/documentation/build.html
    deltaspike/site/trunk/content/documentation/configuration.html
    deltaspike/site/trunk/content/documentation/container-control.html
    deltaspike/site/trunk/content/documentation/core.html
    deltaspike/site/trunk/content/documentation/data.html
    deltaspike/site/trunk/content/documentation/index.html
    deltaspike/site/trunk/content/documentation/jpa.html
    deltaspike/site/trunk/content/documentation/jsf.html
    deltaspike/site/trunk/content/documentation/partial-bean.html
    deltaspike/site/trunk/content/documentation/projectstage.html
    deltaspike/site/trunk/content/documentation/scheduler.html
    deltaspike/site/trunk/content/documentation/security.html
    deltaspike/site/trunk/content/documentation/servlet.html
    deltaspike/site/trunk/content/documentation/source.html
    deltaspike/site/trunk/content/documentation/spi.html
    deltaspike/site/trunk/content/documentation/test-control.html
Removed:
    deltaspike/site/trunk/content/documentation/container-control-test.html
Modified:
    deltaspike/site/trunk/content/documentation/deltaspike_1.0.2.html

Added: deltaspike/site/trunk/content/documentation/bean-validation.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/bean-validation.html?rev=1624296&view=auto
==============================================================================
--- deltaspike/site/trunk/content/documentation/bean-validation.html (added)
+++ deltaspike/site/trunk/content/documentation/bean-validation.html Thu Sep 11 14:16:37 2014
@@ -0,0 +1,244 @@
+<!DOCTYPE html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="description" content="deltaspike-generate-pages">
+<meta name="author" content="chm">
+
+<title>Bean Validation Module</title>
+
+<!-- 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 &quot;License&quot;); 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 &quot;AS IS&quot; 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. -->
+
+<!-- Styles -->
+
+<link href="http://deltaspike.apache.org/resources/css/bootstrap.css" rel="stylesheet">
+<link href="http://deltaspike.apache.org/resources/css/bootstrap-responsive.css" rel="stylesheet">
+
+<style type="text/css">
+/* Foundation stylesheet for CodeRay (to match GitHub theme) | MIT License | http://foundation.zurb.com */
+table.CodeRay { border-collapse: collapse; padding: 2px; margin-bottom: 0; border: 0; background: transparent; }
+table.CodeRay td { padding: 0 .5em; vertical-align: top; }
+table.CodeRay td.line-numbers { text-align: right; color: #999; border-right: 1px solid #e5e5e5; padding-left: 0; }
+span.line-numbers { border-right: 1px solid #E5E5E5; color: #999; display: inline-block; margin-right: 0.5em; padding-right: 0.5em; }
+.CodeRay td.line-numbers strong, .CodeRay span.line-numbers strong { font-weight: normal; }
+.CodeRay .debug { color: white !important; background: blue !important; }
+.CodeRay .annotation { color: #007; }
+.CodeRay .attribute-name { color: #f08; }
+.CodeRay .attribute-value { color: #700; }
+.CodeRay .binary { color: #509; }
+.CodeRay .comment  { color: #999; font-style: italic; }
+.CodeRay .char { color: #04D; }
+.CodeRay .char .content { color: #04D; }
+.CodeRay .char .delimiter { color: #039; }
+.CodeRay .class { color: #458; }
+.CodeRay .complex { color: #A08; }
+.CodeRay .constant { color: teal; }
+.CodeRay .color { color: #0A0; }
+.CodeRay .class-variable { color: #369; }
+.CodeRay .decorator { color: #B0B; }
+.CodeRay .definition { color: #099; }
+.CodeRay .directive { color: #088; }
+.CodeRay .delimiter { color: black; }
+.CodeRay .doc { color: #970; }
+.CodeRay .doctype { color: #34b; }
+.CodeRay .doc-string { color: #D42; }
+.CodeRay .escape  { color: #666; }
+.CodeRay .entity { color: #800; }
+.CodeRay .error { color: #808; }
+.CodeRay .exception { color: #C00; }
+.CodeRay .filename { color: #099; }
+.CodeRay .function { color: #900; }
+.CodeRay .global-variable { color: teal; }
+.CodeRay .hex { color: #058; }
+.CodeRay .integer  { color: #099; }
+.CodeRay .include { color: #B44; }
+.CodeRay .inline { color: black; }
+.CodeRay .inline .inline { background: #ccc; }
+.CodeRay .inline .inline .inline { background: #bbb; }
+.CodeRay .inline .inline-delimiter { color: #D14; }
+.CodeRay .inline-delimiter { color: #D14; }
+.CodeRay .important { color: #f00; }
+.CodeRay .interpreted { color: #B2B; }
+.CodeRay .instance-variable { color: teal; }
+.CodeRay .label { color: #970; }
+.CodeRay .local-variable { color: #963; }
+.CodeRay .octal { color: #40E; }
+.CodeRay .predefined { color: #369; }
+.CodeRay .preprocessor { color: #579; }
+.CodeRay .pseudo-class { color: #00C; }
+.CodeRay .predefined-type { color: #074; }
+.CodeRay .reserved, .keyword  { color: #000; }
+.CodeRay .key { color: #808; }
+.CodeRay .key .delimiter { color: #606; }
+.CodeRay .key .char { color: #80f; }
+.CodeRay .value { color: #088; }
+.CodeRay .regexp { background-color: #fff0ff; }
+.CodeRay .regexp .content { color: #808; }
+.CodeRay .regexp .delimiter { color: #404; }
+.CodeRay .regexp .modifier { color: #C2C; }
+.CodeRay .regexp .function  { color: #404; font-weight: bold; }
+.CodeRay .string { color: #D20; }
+.CodeRay .string .string { }
+.CodeRay .string .string .string { background-color: #ffd0d0; }
+.CodeRay .string .content { color: #D14; }
+.CodeRay .string .char { color: #D14; }
+.CodeRay .string .delimiter { color: #D14; }
+.CodeRay .shell { color: #D14; }
+.CodeRay .shell .content { }
+.CodeRay .shell .delimiter { color: #D14; }
+.CodeRay .symbol { color: #990073; }
+.CodeRay .symbol .content { color: #A60; }
+.CodeRay .symbol .delimiter { color: #630; }
+.CodeRay .tag, .CodeRay .attribute-name { color: #070; }
+.CodeRay .tag-special { color: #D70; }
+.CodeRay .type { color: #339; }
+.CodeRay .variable  { color: #036; }
+.CodeRay .insert { background: #afa; }
+.CodeRay .delete { background: #faa; }
+.CodeRay .change { color: #aaf; background: #007; }
+.CodeRay .head { color: #f8f; background: #505; }
+.CodeRay .insert .insert { color: #080; }
+.CodeRay .delete .delete { color: #800; }
+.CodeRay .change .change { color: #66f; }
+.CodeRay .head .head { color: #f4f; }
+body {
+	padding-top: 60px;
+	padding-bottom: 40px;
+}
+</style>
+<script type="text/javascript">
+
+	  var _gaq = _gaq || [];
+	  _gaq.push(['_setAccount', 'UA-36103647-1']);
+	  _gaq.push(['_trackPageview']);
+	
+	  (function() {
+		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+	  })();
+	
+	</script>
+</head>
+
+<body>
+
+	<div class="navbar navbar-fixed-top">
+		<div class="navbar-inner">
+			<div class="container">
+				<a class="btn btn-navbar" data-toggle="collapse"
+					data-target=".nav-collapse"> <span class="icon-bar"></span> <span
+					class="icon-bar"></span> <span class="icon-bar"></span>
+				</a> <a class="brand logocolor"
+					href="http://deltaspike.apache.org/index.html">Apache
+					DeltaSpike</a>
+				<div class="nav-collapse">
+					<ul class="nav">
+						<li class="active"><a
+							href="http://deltaspike.apache.org/index.html">Home</a></li>
+						<li><a href="http://deltaspike.apache.org/documentation">Documentation</a></li>
+						<li><a href="http://deltaspike.apache.org/source.html">Source</a></li>
+						<li><a href="http://deltaspike.apache.org/download.html">Download</a></li>
+						<li><a href="http://deltaspike.apache.org/community.html">Community</a></li>
+						<!-- <li><a href="./support.html">Support</a></li>  -->
+						<li><a href="http://deltaspike.apache.org/news.html">News</a></li>
+						<li><a
+							href="http://deltaspike.apache.org/migration-guide.html">Migration</a></li>
+					</ul>
+				</div>
+				<!--/.nav-collapse -->
+				<form id="search-form" action="http://www.google.com/search"
+					method="get" class="navbar-search pull-right">
+					<input value="deltaspike.apache.org" name="sitesearch"
+						type="hidden"> <input class="search-query" name="q"
+						id="query" type="text">
+				</form>
+			</div>
+		</div>
+	</div>
+
+	<div class="container">
+		<div class="row">
+			<div class="span12">
+				<div class="page-title">
+			    <h1>Bean Validation Module</h1>
+                </div>
+
+				<div id="toc" class="toc2">
+       	 		<ul class="sectlevel1">
+<li><a href="#_introduction">Introduction</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#_scoping">Scoping</a></li>
+<li><a href="#_code_requirements">Code Requirements</a></li>
+</ul>
+</li>
+</ul>
+       	 		<hr>	
+       	 		
+				<div class="sect1">
+<h2 id="_introduction">Introduction</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>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.</p>
+</div>
+<div class="sect2">
+<h3 id="_scoping">Scoping</h3>
+<div class="paragraph">
+<p><code>ConstraintValidator`s will inherit whatever scope as defined in the
+bean class. Inherently, a `ConstraintValidator</code> may be invoked by
+multiple threads so please keep that in mind when using them. You should
+consider using at least <code>RequestScoped</code> validators.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_code_requirements">Code Requirements</h3>
+<div class="paragraph">
+<p>There are no compile dependencies to use the Bean Validation module. You
+simply need to override the factory, either in Java:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay"><code class="java language-java">Validation.byDefaultProvider().configure().constraintValidatorFactory(<span class="keyword">new</span> CDIAwareConstraintValidatorFactory()).buildValidatorFactory()</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Or in XML:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay"><code class="xml language-xml">:::xml
+<span class="tag">&lt;validation-config</span> <span class="attribute-name">xmlns</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">http://jboss.org/xml/ns/javax/validation/configuration</span><span class="delimiter">&quot;</span></span>
+ <span class="attribute-name">xmlns:xsi</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">http://www.w3.org/2001/XMLSchema-instance</span><span class="delimiter">&quot;</span></span>
+ <span class="attribute-name">xsi:schemaLocation</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">http://jboss.org/xml/ns/javax/validation/configuration</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
+    <span class="tag">&lt;constraint-validator-factory&gt;</span>org.apache.deltaspike.beanvalidation.impl.CDIAwareConstraintValidatorFactory<span class="tag">&lt;/constraint-validator-factory&gt;</span>
+<span class="tag">&lt;/validation-config&gt;</span></code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>And then you can simply build your `ConstraintValidator`s based on CDI
+programming rules.</p>
+</div>
+</div>
+</div>
+</div>
+			</div>
+
+			<hr>
+
+			<footer>
+				<p>Copyright © 2011-2014 The Apache Software Foundation,
+					Licensed under the Apache License, Version 2.0.</p>
+				<p>Apache and the Apache feather logo are trademarks of The
+					Apache Software Foundation.</p>
+			</footer>
+
+		</div>
+		<!-- /.container -->
+
+</body>
+</html>
\ No newline at end of file

Added: deltaspike/site/trunk/content/documentation/build.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/build.html?rev=1624296&view=auto
==============================================================================
--- deltaspike/site/trunk/content/documentation/build.html (added)
+++ deltaspike/site/trunk/content/documentation/build.html Thu Sep 11 14:16:37 2014
@@ -0,0 +1,387 @@
+<!DOCTYPE html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="description" content="deltaspike-generate-pages">
+<meta name="author" content="chm">
+
+<title>Building DeltaSpike from source</title>
+
+<!-- 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 &quot;License&quot;); 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 &quot;AS IS&quot; 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. -->
+
+<!-- Styles -->
+
+<link href="http://deltaspike.apache.org/resources/css/bootstrap.css" rel="stylesheet">
+<link href="http://deltaspike.apache.org/resources/css/bootstrap-responsive.css" rel="stylesheet">
+
+<style type="text/css">
+/* Foundation stylesheet for CodeRay (to match GitHub theme) | MIT License | http://foundation.zurb.com */
+table.CodeRay { border-collapse: collapse; padding: 2px; margin-bottom: 0; border: 0; background: transparent; }
+table.CodeRay td { padding: 0 .5em; vertical-align: top; }
+table.CodeRay td.line-numbers { text-align: right; color: #999; border-right: 1px solid #e5e5e5; padding-left: 0; }
+span.line-numbers { border-right: 1px solid #E5E5E5; color: #999; display: inline-block; margin-right: 0.5em; padding-right: 0.5em; }
+.CodeRay td.line-numbers strong, .CodeRay span.line-numbers strong { font-weight: normal; }
+.CodeRay .debug { color: white !important; background: blue !important; }
+.CodeRay .annotation { color: #007; }
+.CodeRay .attribute-name { color: #f08; }
+.CodeRay .attribute-value { color: #700; }
+.CodeRay .binary { color: #509; }
+.CodeRay .comment  { color: #999; font-style: italic; }
+.CodeRay .char { color: #04D; }
+.CodeRay .char .content { color: #04D; }
+.CodeRay .char .delimiter { color: #039; }
+.CodeRay .class { color: #458; }
+.CodeRay .complex { color: #A08; }
+.CodeRay .constant { color: teal; }
+.CodeRay .color { color: #0A0; }
+.CodeRay .class-variable { color: #369; }
+.CodeRay .decorator { color: #B0B; }
+.CodeRay .definition { color: #099; }
+.CodeRay .directive { color: #088; }
+.CodeRay .delimiter { color: black; }
+.CodeRay .doc { color: #970; }
+.CodeRay .doctype { color: #34b; }
+.CodeRay .doc-string { color: #D42; }
+.CodeRay .escape  { color: #666; }
+.CodeRay .entity { color: #800; }
+.CodeRay .error { color: #808; }
+.CodeRay .exception { color: #C00; }
+.CodeRay .filename { color: #099; }
+.CodeRay .function { color: #900; }
+.CodeRay .global-variable { color: teal; }
+.CodeRay .hex { color: #058; }
+.CodeRay .integer  { color: #099; }
+.CodeRay .include { color: #B44; }
+.CodeRay .inline { color: black; }
+.CodeRay .inline .inline { background: #ccc; }
+.CodeRay .inline .inline .inline { background: #bbb; }
+.CodeRay .inline .inline-delimiter { color: #D14; }
+.CodeRay .inline-delimiter { color: #D14; }
+.CodeRay .important { color: #f00; }
+.CodeRay .interpreted { color: #B2B; }
+.CodeRay .instance-variable { color: teal; }
+.CodeRay .label { color: #970; }
+.CodeRay .local-variable { color: #963; }
+.CodeRay .octal { color: #40E; }
+.CodeRay .predefined { color: #369; }
+.CodeRay .preprocessor { color: #579; }
+.CodeRay .pseudo-class { color: #00C; }
+.CodeRay .predefined-type { color: #074; }
+.CodeRay .reserved, .keyword  { color: #000; }
+.CodeRay .key { color: #808; }
+.CodeRay .key .delimiter { color: #606; }
+.CodeRay .key .char { color: #80f; }
+.CodeRay .value { color: #088; }
+.CodeRay .regexp { background-color: #fff0ff; }
+.CodeRay .regexp .content { color: #808; }
+.CodeRay .regexp .delimiter { color: #404; }
+.CodeRay .regexp .modifier { color: #C2C; }
+.CodeRay .regexp .function  { color: #404; font-weight: bold; }
+.CodeRay .string { color: #D20; }
+.CodeRay .string .string { }
+.CodeRay .string .string .string { background-color: #ffd0d0; }
+.CodeRay .string .content { color: #D14; }
+.CodeRay .string .char { color: #D14; }
+.CodeRay .string .delimiter { color: #D14; }
+.CodeRay .shell { color: #D14; }
+.CodeRay .shell .content { }
+.CodeRay .shell .delimiter { color: #D14; }
+.CodeRay .symbol { color: #990073; }
+.CodeRay .symbol .content { color: #A60; }
+.CodeRay .symbol .delimiter { color: #630; }
+.CodeRay .tag, .CodeRay .attribute-name { color: #070; }
+.CodeRay .tag-special { color: #D70; }
+.CodeRay .type { color: #339; }
+.CodeRay .variable  { color: #036; }
+.CodeRay .insert { background: #afa; }
+.CodeRay .delete { background: #faa; }
+.CodeRay .change { color: #aaf; background: #007; }
+.CodeRay .head { color: #f8f; background: #505; }
+.CodeRay .insert .insert { color: #080; }
+.CodeRay .delete .delete { color: #800; }
+.CodeRay .change .change { color: #66f; }
+.CodeRay .head .head { color: #f4f; }
+body {
+	padding-top: 60px;
+	padding-bottom: 40px;
+}
+</style>
+<script type="text/javascript">
+
+	  var _gaq = _gaq || [];
+	  _gaq.push(['_setAccount', 'UA-36103647-1']);
+	  _gaq.push(['_trackPageview']);
+	
+	  (function() {
+		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+	  })();
+	
+	</script>
+</head>
+
+<body>
+
+	<div class="navbar navbar-fixed-top">
+		<div class="navbar-inner">
+			<div class="container">
+				<a class="btn btn-navbar" data-toggle="collapse"
+					data-target=".nav-collapse"> <span class="icon-bar"></span> <span
+					class="icon-bar"></span> <span class="icon-bar"></span>
+				</a> <a class="brand logocolor"
+					href="http://deltaspike.apache.org/index.html">Apache
+					DeltaSpike</a>
+				<div class="nav-collapse">
+					<ul class="nav">
+						<li class="active"><a
+							href="http://deltaspike.apache.org/index.html">Home</a></li>
+						<li><a href="http://deltaspike.apache.org/documentation">Documentation</a></li>
+						<li><a href="http://deltaspike.apache.org/source.html">Source</a></li>
+						<li><a href="http://deltaspike.apache.org/download.html">Download</a></li>
+						<li><a href="http://deltaspike.apache.org/community.html">Community</a></li>
+						<!-- <li><a href="./support.html">Support</a></li>  -->
+						<li><a href="http://deltaspike.apache.org/news.html">News</a></li>
+						<li><a
+							href="http://deltaspike.apache.org/migration-guide.html">Migration</a></li>
+					</ul>
+				</div>
+				<!--/.nav-collapse -->
+				<form id="search-form" action="http://www.google.com/search"
+					method="get" class="navbar-search pull-right">
+					<input value="deltaspike.apache.org" name="sitesearch"
+						type="hidden"> <input class="search-query" name="q"
+						id="query" type="text">
+				</form>
+			</div>
+		</div>
+	</div>
+
+	<div class="container">
+		<div class="row">
+			<div class="span12">
+				<div class="page-title">
+			    <h1>Building DeltaSpike from source</h1>
+                </div>
+
+				<div id="toc" class="toc2">
+       	 		<ul class="sectlevel1">
+<li><a href="#_introduction">Introduction</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#_full_build">Full build</a></li>
+<li><a href="#_build_with_test">Build with test</a></li>
+<li><a href="#_integration_tests">Integration Tests</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#_tomee">TomEE</a></li>
+<li><a href="#_jboss_as7">JBoss AS7</a></li>
+<li><a href="#_wildfly_8">WildFly 8</a></li>
+<li><a href="#_glassfish_3_1">GlassFish 3.1</a></li>
+<li><a href="#_glassfish_4">GlassFish 4</a></li>
+<li><a href="#_weblogic_12c">WebLogic 12c</a></li>
+</ul>
+</li>
+<li><a href="#_jenkins_builds">Jenkins Builds</a></li>
+<li><a href="#_sonar">Sonar</a></li>
+</ul>
+</li>
+</ul>
+       	 		<hr>	
+       	 		
+				<div class="sect1">
+<h2 id="_introduction">Introduction</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Deltaspike uses <a href="http://maven.apache.org/">maven</a> build tool to automate the compilation, testing and packaging of the project</p>
+</div>
+<div class="sect2">
+<h3 id="_full_build">Full build</h3>
+<div class="listingblock">
+<div class="content">
+<pre>mvn clean install</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_build_with_test">Build with test</h3>
+<div class="listingblock">
+<div class="content">
+<pre>mvn clean install -POWB //execute the unit tests with OpenWebBeans
+or
+mvn clean install -PWeld //execute the unit tests with Weld</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_integration_tests">Integration Tests</h3>
+<div class="paragraph">
+<p>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.</p>
+</div>
+<div class="sect3">
+<h4 id="_tomee">TomEE</h4>
+<div class="paragraph">
+<p><strong>Executing the Arquillian tests with Apache TomEE</strong></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>mvn clean install -Ptomee-build-managed</pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_jboss_as7">JBoss AS7</h4>
+<div class="sect4">
+<h5 id="_without_existing_as7">Without existing AS7</h5>
+<div class="paragraph">
+<p><strong>Executing the Arquillian tests with JBoss AS7 (without AS7
+installation)</strong></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>mvn clean install -Pjbossas-build-managed-7</pre>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_with_existing_as7">With existing AS7</h5>
+<div class="paragraph">
+<p>Set JBoss_HOME</p>
+</div>
+<div class="paragraph">
+<p><strong>Executing the Arquillian tests with JBoss AS7 (AS7 installation
+required)</strong></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>mvn clean install -Pjbossas-managed-7</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_wildfly_8">WildFly 8</h4>
+<div class="sect4">
+<h5 id="_without_existing_wf8">Without existing WF8</h5>
+<div class="paragraph">
+<p><strong>Executing the Arquillian tests with JBoss-WF8 (without WF8
+installation)</strong></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>mvn clean install -Pwildfly-build-managed</pre>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_with_existing_wf8">With existing WF8</h5>
+<div class="paragraph">
+<p>Set WILDFLY_HOME</p>
+</div>
+<div class="paragraph">
+<p><strong>Executing the Arquillian tests with JBoss-WF8 (WF8 installation
+required)</strong></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>mvn clean install -Pwildfly-managed</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_glassfish_3_1">GlassFish 3.1</h4>
+<div class="sect4">
+<h5 id="_without_existing_gf3">Without existing GF3</h5>
+<div class="paragraph">
+<p><strong>Executing the Arquillian tests with GF3 (without GF3 installation)</strong></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>mvn clean install -Pglassfish-build-managed-3</pre>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_with_existing_gf3">With existing GF3</h5>
+<div class="paragraph">
+<p>Install GlassFish (default setup without admin-password) and start
+GlassFish with asadmin start-domain <strong>and</strong> asadmin start-database</p>
+</div>
+<div class="paragraph">
+<p><strong>Executing the Arquillian tests with Oracle Glassfish 3.1+</strong></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>mvn clean install -Pglassfish-remote-3.1</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_glassfish_4">GlassFish 4</h4>
+<div class="sect4">
+<h5 id="_without_existing_gf4">Without existing GF4</h5>
+<div class="paragraph">
+<p><strong>Executing the Arquillian tests with GF4 (without GF4 installation)</strong></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>mvn clean install -Pglassfish-build-managed-4</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_weblogic_12c">WebLogic 12c</h4>
+<div class="paragraph">
+<p>Install WebLogic 12c. Start Confiuration 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.</p>
+</div>
+<div class="paragraph">
+<p><strong>Executing the Arquillian tests with Oracle WebLogic 12c</strong></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>mvn clean install -Pwls-remote-12c</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_jenkins_builds">Jenkins Builds</h3>
+<div class="paragraph">
+<p><a href="https://builds.apache.org/view/A-D/view/DeltaSpike/">https://builds.apache.org/view/A-D/view/DeltaSpike/</a></p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_sonar">Sonar</h3>
+<div class="paragraph">
+<p><a href="https://analysis.apache.org/dashboard/index/org.apache.deltaspike:deltaspike-project">https://analysis.apache.org/dashboard/index/org.apache.deltaspike:deltaspike-project</a></p>
+</div>
+</div>
+</div>
+</div>
+			</div>
+
+			<hr>
+
+			<footer>
+				<p>Copyright © 2011-2014 The Apache Software Foundation,
+					Licensed under the Apache License, Version 2.0.</p>
+				<p>Apache and the Apache feather logo are trademarks of The
+					Apache Software Foundation.</p>
+			</footer>
+
+		</div>
+		<!-- /.container -->
+
+</body>
+</html>
\ No newline at end of file

Added: deltaspike/site/trunk/content/documentation/configuration.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/configuration.html?rev=1624296&view=auto
==============================================================================
--- deltaspike/site/trunk/content/documentation/configuration.html (added)
+++ deltaspike/site/trunk/content/documentation/configuration.html Thu Sep 11 14:16:37 2014
@@ -0,0 +1,600 @@
+<!DOCTYPE html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="description" content="deltaspike-generate-pages">
+<meta name="author" content="chm">
+
+<title>DeltaSpike Configuration Mechanism</title>
+
+<!-- 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 &quot;License&quot;); 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 &quot;AS IS&quot; 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. -->
+
+<!-- Styles -->
+
+<link href="http://deltaspike.apache.org/resources/css/bootstrap.css" rel="stylesheet">
+<link href="http://deltaspike.apache.org/resources/css/bootstrap-responsive.css" rel="stylesheet">
+
+<style type="text/css">
+/* Foundation stylesheet for CodeRay (to match GitHub theme) | MIT License | http://foundation.zurb.com */
+table.CodeRay { border-collapse: collapse; padding: 2px; margin-bottom: 0; border: 0; background: transparent; }
+table.CodeRay td { padding: 0 .5em; vertical-align: top; }
+table.CodeRay td.line-numbers { text-align: right; color: #999; border-right: 1px solid #e5e5e5; padding-left: 0; }
+span.line-numbers { border-right: 1px solid #E5E5E5; color: #999; display: inline-block; margin-right: 0.5em; padding-right: 0.5em; }
+.CodeRay td.line-numbers strong, .CodeRay span.line-numbers strong { font-weight: normal; }
+.CodeRay .debug { color: white !important; background: blue !important; }
+.CodeRay .annotation { color: #007; }
+.CodeRay .attribute-name { color: #f08; }
+.CodeRay .attribute-value { color: #700; }
+.CodeRay .binary { color: #509; }
+.CodeRay .comment  { color: #999; font-style: italic; }
+.CodeRay .char { color: #04D; }
+.CodeRay .char .content { color: #04D; }
+.CodeRay .char .delimiter { color: #039; }
+.CodeRay .class { color: #458; }
+.CodeRay .complex { color: #A08; }
+.CodeRay .constant { color: teal; }
+.CodeRay .color { color: #0A0; }
+.CodeRay .class-variable { color: #369; }
+.CodeRay .decorator { color: #B0B; }
+.CodeRay .definition { color: #099; }
+.CodeRay .directive { color: #088; }
+.CodeRay .delimiter { color: black; }
+.CodeRay .doc { color: #970; }
+.CodeRay .doctype { color: #34b; }
+.CodeRay .doc-string { color: #D42; }
+.CodeRay .escape  { color: #666; }
+.CodeRay .entity { color: #800; }
+.CodeRay .error { color: #808; }
+.CodeRay .exception { color: #C00; }
+.CodeRay .filename { color: #099; }
+.CodeRay .function { color: #900; }
+.CodeRay .global-variable { color: teal; }
+.CodeRay .hex { color: #058; }
+.CodeRay .integer  { color: #099; }
+.CodeRay .include { color: #B44; }
+.CodeRay .inline { color: black; }
+.CodeRay .inline .inline { background: #ccc; }
+.CodeRay .inline .inline .inline { background: #bbb; }
+.CodeRay .inline .inline-delimiter { color: #D14; }
+.CodeRay .inline-delimiter { color: #D14; }
+.CodeRay .important { color: #f00; }
+.CodeRay .interpreted { color: #B2B; }
+.CodeRay .instance-variable { color: teal; }
+.CodeRay .label { color: #970; }
+.CodeRay .local-variable { color: #963; }
+.CodeRay .octal { color: #40E; }
+.CodeRay .predefined { color: #369; }
+.CodeRay .preprocessor { color: #579; }
+.CodeRay .pseudo-class { color: #00C; }
+.CodeRay .predefined-type { color: #074; }
+.CodeRay .reserved, .keyword  { color: #000; }
+.CodeRay .key { color: #808; }
+.CodeRay .key .delimiter { color: #606; }
+.CodeRay .key .char { color: #80f; }
+.CodeRay .value { color: #088; }
+.CodeRay .regexp { background-color: #fff0ff; }
+.CodeRay .regexp .content { color: #808; }
+.CodeRay .regexp .delimiter { color: #404; }
+.CodeRay .regexp .modifier { color: #C2C; }
+.CodeRay .regexp .function  { color: #404; font-weight: bold; }
+.CodeRay .string { color: #D20; }
+.CodeRay .string .string { }
+.CodeRay .string .string .string { background-color: #ffd0d0; }
+.CodeRay .string .content { color: #D14; }
+.CodeRay .string .char { color: #D14; }
+.CodeRay .string .delimiter { color: #D14; }
+.CodeRay .shell { color: #D14; }
+.CodeRay .shell .content { }
+.CodeRay .shell .delimiter { color: #D14; }
+.CodeRay .symbol { color: #990073; }
+.CodeRay .symbol .content { color: #A60; }
+.CodeRay .symbol .delimiter { color: #630; }
+.CodeRay .tag, .CodeRay .attribute-name { color: #070; }
+.CodeRay .tag-special { color: #D70; }
+.CodeRay .type { color: #339; }
+.CodeRay .variable  { color: #036; }
+.CodeRay .insert { background: #afa; }
+.CodeRay .delete { background: #faa; }
+.CodeRay .change { color: #aaf; background: #007; }
+.CodeRay .head { color: #f8f; background: #505; }
+.CodeRay .insert .insert { color: #080; }
+.CodeRay .delete .delete { color: #800; }
+.CodeRay .change .change { color: #66f; }
+.CodeRay .head .head { color: #f4f; }
+body {
+	padding-top: 60px;
+	padding-bottom: 40px;
+}
+</style>
+<script type="text/javascript">
+
+	  var _gaq = _gaq || [];
+	  _gaq.push(['_setAccount', 'UA-36103647-1']);
+	  _gaq.push(['_trackPageview']);
+	
+	  (function() {
+		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+	  })();
+	
+	</script>
+</head>
+
+<body>
+
+	<div class="navbar navbar-fixed-top">
+		<div class="navbar-inner">
+			<div class="container">
+				<a class="btn btn-navbar" data-toggle="collapse"
+					data-target=".nav-collapse"> <span class="icon-bar"></span> <span
+					class="icon-bar"></span> <span class="icon-bar"></span>
+				</a> <a class="brand logocolor"
+					href="http://deltaspike.apache.org/index.html">Apache
+					DeltaSpike</a>
+				<div class="nav-collapse">
+					<ul class="nav">
+						<li class="active"><a
+							href="http://deltaspike.apache.org/index.html">Home</a></li>
+						<li><a href="http://deltaspike.apache.org/documentation">Documentation</a></li>
+						<li><a href="http://deltaspike.apache.org/source.html">Source</a></li>
+						<li><a href="http://deltaspike.apache.org/download.html">Download</a></li>
+						<li><a href="http://deltaspike.apache.org/community.html">Community</a></li>
+						<!-- <li><a href="./support.html">Support</a></li>  -->
+						<li><a href="http://deltaspike.apache.org/news.html">News</a></li>
+						<li><a
+							href="http://deltaspike.apache.org/migration-guide.html">Migration</a></li>
+					</ul>
+				</div>
+				<!--/.nav-collapse -->
+				<form id="search-form" action="http://www.google.com/search"
+					method="get" class="navbar-search pull-right">
+					<input value="deltaspike.apache.org" name="sitesearch"
+						type="hidden"> <input class="search-query" name="q"
+						id="query" type="text">
+				</form>
+			</div>
+		</div>
+	</div>
+
+	<div class="container">
+		<div class="row">
+			<div class="span12">
+				<div class="page-title">
+			    <h1>DeltaSpike Configuration Mechanism</h1>
+                </div>
+
+				<div id="toc" class="toc2">
+       	 		<ul class="sectlevel1">
+<li><a href="#_configuration_basics">Configuration Basics</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#_benefits_for_production">Benefits for Production</a></li>
+<li><a href="#_drop_in_configuration">Drop-In Configuration</a></li>
+<li><a href="#_cdi_extension_configuration">CDI-Extension Configuration</a></li>
+<li><a href="#_userland_configuration">Userland Configuration</a></li>
+</ul>
+</li>
+<li><a href="#_configresolver">ConfigResolver</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#_getpropertyvalue">getPropertyValue()</a></li>
+<li><a href="#_getprojectstageawarepropertyvalue">getProjectStageAwarePropertyValue()</a></li>
+<li><a href="#_handling_of_default_values">handling of default values</a></li>
+</ul>
+</li>
+<li><a href="#_configsource">ConfigSource</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#_configsources_provided_by_default">ConfigSources provided by default</a></li>
+<li><a href="#_reordering_of_the_default_order_of_config_sources">Reordering of the default order of Config-Sources</a></li>
+<li><a href="#_custom_config_sources">Custom Config-Sources</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#_propertyfileconfig">PropertyFileConfig</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#_type_safe_configuration">Type-safe configuration</a></li>
+</ul>
+       	 		<hr>	
+       	 		
+				<div class="sect1">
+<h2 id="_configuration_basics">Configuration Basics</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The goal of the DeltaSpike configuration mechanism is to make it
+obsolete to touch released binaries for changing the configuration of
+your project. All values which are needed in your code (but should not
+be hardcoded as static final constants) can be maintained via
+DeltaSpikes own configuration mechanism in a very flexible and powerful
+way.</p>
+</div>
+<div class="sect2">
+<h3 id="_benefits_for_production">Benefits for Production</h3>
+<div class="paragraph">
+<p>Once a binary like a WAR file or an EAR got created and tested, it must
+<em>not</em> get changed anymore. The exact same binary which got created by
+the release manager will get moved to the Test system, then further
+propagated to the Staging environment and finally (if all people are
+happy with it) will get moved to the Production system. And all this
+without any changes on the binary itself!</p>
+</div>
+<div class="paragraph">
+<p>The Apache DeltaSpike configuration system makes this possible by
+providing a default configuration inside the binary and allowing to
+amend this configuration (e.g. database credentials, some URLs from
+remote REST or SOAP endpoints, etc) from outside like environment
+settings, JNDI or the current <a href="projectstage.html">ProjectStage</a>.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_drop_in_configuration">Drop-In Configuration</h3>
+<div class="paragraph">
+<p>This mechanism also allows for dynamic configuration in case of a JAR
+drop-in. By adding some JAR to the classpath, all it&#8217;s contained
+configuration will get picked up and considered in the property value
+evaluation. You could also use this mechanism to switch implementations
+of some SPI (Service Provider Interface) in your own code.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_cdi_extension_configuration">CDI-Extension Configuration</h3>
+<div class="paragraph">
+<p>In some cases low-level configs are needed e.g. during the bootstrapping
+process of the CDI container.</p>
+</div>
+<div class="paragraph">
+<p>The good news: our DeltaSpike configuration mechanism does not rely on
+any other EE mechanism to be booted. Which means it can perfectly get
+used to even configure those parts itself. Since the mechanism doesn&#8217;t
+rely on CDI it can for example be used to configure CDI-Extensions.</p>
+</div>
+<div class="paragraph">
+<p>Currently this is e.g. used to configure the value of the current <a href="projectstage.html">ProjectStage</a>, configured values which can be
+used in the expressions for <code>@Exclude</code>, <em>Deactivatable</em>, etc. DeltaSpike
+needs such a low-level approach for several features internally, but
+users can utilize it for their own needs as well. This is done by using
+the <code>ConfigResolver</code> which resolves and caches `ConfigSource`s per
+application.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_userland_configuration">Userland Configuration</h3>
+<div class="paragraph">
+<p>DeltaSpike also provides a mechanism to inject those configured values
+using the <code>@ConfigProperty</code> CDI Qualifier.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_configresolver">ConfigResolver</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The <code>ConfigResolver</code> is the central point to pick up configured values
+in DeltaSpike.</p>
+</div>
+<div class="sect2">
+<h3 id="_getpropertyvalue">getPropertyValue()</h3>
+<div class="paragraph">
+<p>The method <code>ConfigResolver#getPropertyValue(String key)</code> allows to
+provide a string based key and returns the configured value as <code>String</code>,
+or <code>null</code> if no value has been found.</p>
+</div>
+<div class="paragraph">
+<p><code>ConfigResolver#getAllPropertyValues(String key)</code> has a similar contract
+but it returns a list which might be empty if there are no configured
+values for the given key.</p>
+</div>
+<div class="paragraph">
+<p>This is a code excerpt about how to do a simple lookup in the deltaspike
+configuration:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay"><code class="java language-java"><span class="predefined-type">String</span> dbUserName = ConfigResolver.getPropertyValue(<span class="string"><span class="delimiter">&quot;</span><span class="content">databaseconfig.username</span><span class="delimiter">&quot;</span></span>);</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_getprojectstageawarepropertyvalue">getProjectStageAwarePropertyValue()</h3>
+<div class="paragraph">
+<p>The method
+<code>ConfigResolver#getProjectStageAwarePropertyValue(String key)</code> utilizes
+the <a href="projectstage.html">DeltaSpike ProjectStage</a> mechanism to allow
+configured values to depend on the current <code>ProjectStage</code> of the system
+we run on.</p>
+</div>
+<div class="paragraph">
+<p>This is done by first looking up the ProjectStage (this internally
+happens with the DeltaSpike ConfigResolver as well) and then go down the
+following lookup chain until we found a configured value.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>key + <em>.</em> + projectStage , e.g. "databaseconfig.username.Production"</p>
+</li>
+<li>
+<p>key alone , e.g. "databaseconfig.username"</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>getPropertyAwarePropertyValue()
+<sub>~</sub><sub>~</sub><sub>~</sub><sub>~</sub><sub>~</sub><sub>~</sub><sub>~</sub><sub>~</sub><sub>~</sub><sub>~</sub><sub>~</sub></p>
+</div>
+<div class="paragraph">
+<p>The method
+<code>ConfigResolver#getProjectStageAwarePropertyValue(String key, String property)</code>
+first looks up the configured value of the given property and uses this
+value to determine the final lookup path. All those lookups take the
+<a href="projectstage.html">DeltaSpike ProjectStage</a> mechanism into account.</p>
+</div>
+<div class="paragraph">
+<p>Given we have the following code in our program:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay"><code class="java language-java"><span class="predefined-type">String</span> dbUserName = ConfigResolver.getPropertyAwarePropertyValue(<span class="string"><span class="delimiter">&quot;</span><span class="content">databaseconfig.username</span><span class="delimiter">&quot;</span></span>, <span class="string"><span class="delimiter">&quot;</span><span class="content">dbvendor</span><span class="delimiter">&quot;</span></span>);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This will end up in the following lookup sequences. First we need to
+resolve the value of the property:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>propertyValue = property + <em>.</em> + projectStage, e.g. "dbvendor.Production"</p>
+</li>
+<li>
+<p>if nothing found: propertyValue = property, e.g. "dbvendor"</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Let&#8217;s assume we found the value <em>mysql</em> for our dbvendor. In this case
+the following lookup chain is used until a value got found:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>key + <em>.</em> + property + projectstage, e.g. "databaseconfig.username.mysql.Production"</p>
+</li>
+<li>
+<p>key + <em>.</em> + property, e.g. "databaseconfig.username.mysql"</p>
+</li>
+<li>
+<p>key + <em>.</em> + projectstage, e.g. "databaseconfig.username.Production"</p>
+</li>
+<li>
+<p>key, e.g. "databaseconfig.username"</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_handling_of_default_values">handling of default values</h3>
+<div class="paragraph">
+<p>There is a 2nd variant of all those methods where it is possible to
+provide a default value which gets returned instead of <code>null</code> or if the
+final result is an empty String.</p>
+</div>
+<div class="paragraph">
+<p><strong>Performance Hint:</strong></p>
+</div>
+<div class="paragraph">
+<p>The only <code>ConfigResolver</code> operation which is cached is the determination
+of the <code>ConfigSources</code>. The various getPropertyValue operations are not
+cached in the ConfigResolver but might be cached in the ConfigSources.
+This makes the overall calculation a bit slower, but allows for values
+to change dynamically if someone likes to e.g. implement a
+<code>JmxConfigSource</code> (not yet part of DeltaSpike, but easily
+implementable).</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_configsource">ConfigSource</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>A <code>ConfigSource</code> is exactly what it&#8217;s name says: a source for configured
+values. The <code>ConfigResolver</code> uses all configured implementations of
+<code>ConfigSource</code> to lookup the property in question.</p>
+</div>
+<div class="paragraph">
+<p>Each <em>ConfigSource</em> has a specified <em>ordinal</em> which can be configured
+using the key <code>deltaspike_ordinal</code>. This ordinal get&#8217;s used to determine
+the importance of the values taken from the very ConfigSource. A higher
+ordinal means that the values taken from this ConfigSource will override
+values from less important ConfigSources. This is the trick which allows
+to amend configuration from outside a binary - given those outside
+ConfigSources have a higher <code>deltaspike_ordinal</code> than the ones who
+pickup the values from within the release binaries.</p>
+</div>
+<div class="sect2">
+<h3 id="_configsources_provided_by_default">ConfigSources provided by default</h3>
+<div class="paragraph">
+<p>Per default there are implementations for the following config sources
+(listed in the lookup order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>System properties (deltaspike_ordinal = 400)</p>
+</li>
+<li>
+<p>Environment properties (deltaspike_ordinal = 300)</p>
+</li>
+<li>
+<p>JNDI values (deltaspike_ordinal = 200, the base name is "java:comp/env/deltaspike/")</p>
+</li>
+<li>
+<p>Properties file values (apache-deltaspike.properties) (deltaspike_ordinal = 100, default filename is "META-INF/apache-deltaspike.properties")</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>It&#8217;s possible to change this order and to add custom config sources.</strong></p>
+</div>
+<div class="paragraph">
+<p><strong>Note:</strong> Important Hints esp. for custom implementations: - The
+config-source with the highest ordinal gets used first. - If a custom
+implementation should be invoked <em>before</em> the default implementations,
+use an ordinal-value &gt; 400 - If a custom implementation should be
+invoked <em>after</em> the default implementations, use an ordinal-value &lt; 100
+- The <code>ConfigResolver</code> performs no caching. If your custom ConfigSource
+operation is expensive, then you might think about introducing some
+caching.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_reordering_of_the_default_order_of_config_sources">Reordering of the default order of Config-Sources</h3>
+<div class="paragraph">
+<p>To change the lookup order, you have to configure the ordinal in the
+corresponding config source (e.g. to change the config ordinal of the
+config source for system properties, you have to set the system property
+with the ordinal key <em>deltaspike_ordinal</em> and the new value).</p>
+</div>
+<div class="paragraph">
+<p>Example with <code>/META-INF/apache-deltaspike.properties</code>: If the properties
+file/s should be used <strong>before</strong> the other implementations, you have to
+configure an ordinal &gt; 400. That means, you have to add e.g.
+<code>deltaspike_ordinal=401</code>.</p>
+</div>
+<div class="paragraph">
+<p>Each single property file is treated as own <code>ConfigSource</code> and thus can
+have different <code>deltaspike_ordinal</code> values!</p>
+</div>
+<div class="paragraph">
+<p><strong>Hint:</strong></p>
+</div>
+<div class="paragraph">
+<p>In case of <strong>property files</strong> which are supported by default
+(<code>/META-INF/apache-deltaspike.properties</code>) every file is handled as
+independent config-source, but all of them have ordinal 400 by default
+(and can be reordered in a fine-grained manner).</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_custom_config_sources">Custom Config-Sources</h3>
+<div class="paragraph">
+<p>ConfigSources are picked up using the &#8216;java.util.ServiceLoader&#8217;
+mechanism.</p>
+</div>
+<div class="paragraph">
+<p>To add a custom config-source, you have to implement the interface
+<code>ConfigSource</code> and register your implementation in a file
+<code>/META-INF/services/org.apache.deltaspike.core.spi.config.ConfigSource</code>
+by writing the fully qualified class name of the custom implementation/s
+into it.</p>
+</div>
+<div class="paragraph">
+<p>If you need dynamic ConfigSources you can also register a
+<code>ConfigSourceProvider</code> in a similar way. This is useful if you like to
+dynamically pick up multiple ConfigSources of the same kind. E.g. if you
+like to pick up all <code>myproject.properties</code> files from all the JARs in
+your classpath.</p>
+</div>
+<div class="paragraph">
+<p>Please note that a single <code>ConfigSource</code> should be either registered
+directly or via a <code>ConfigSourceProvider</code>, but never both ways.</p>
+</div>
+<div class="paragraph">
+<p><strong>Important Hint:</strong></p>
+</div>
+<div class="paragraph">
+<p>Have a look at the abstract base-implementation of <code>ConfigSource</code>
+DeltaSpike is using internally, if a custom implementation should load
+the ordinal value from the config-source like the default
+implementations provided by DeltaSpike do.</p>
+</div>
+<div class="sect3">
+<h4 id="_propertyfileconfig">PropertyFileConfig</h4>
+<div class="paragraph">
+<p>For registering all your own property files of a certain name in your
+classpath to get picked up as <code>ConfigSource`s you can also provide a
+class which implements the `PropertyFileConfig</code> interface.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay"><code class="java language-java"><span class="directive">public</span> <span class="type">class</span> <span class="class">MyCustomPropertyFileConfig</span> <span class="directive">implements</span> PropertyFileConfig
+{
+    <span class="annotation">@Override</span>
+    <span class="directive">public</span> <span class="predefined-type">String</span> getPropertyFileName()
+    {
+        <span class="keyword">return</span> <span class="string"><span class="delimiter">&quot;</span><span class="content">myconfig.properties</span><span class="delimiter">&quot;</span></span>;
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>Note: If you are using WildFly with EAR packaging and with
+ear-subdeployments-isolated=true, then your EAR should have a deployment
+dependency to the module that contains the property file.</em></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay"><code class="xml language-xml"><span class="tag">&lt;jboss-deployment-structure&gt;</span>
+    <span class="tag">&lt;ear-subdeployments-isolated&gt;</span>true<span class="tag">&lt;/ear-subdeployments-isolated&gt;</span>
+      <span class="tag">&lt;deployment&gt;</span>
+            <span class="tag">&lt;dependencies&gt;</span>
+            <span class="comment">&lt;!-- This module contains the custom PropertyFileConfig and the property file --&gt;</span>
+                  <span class="tag">&lt;module</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">deployment.yourproject.ear.yoursubmodule.jar</span><span class="delimiter">&quot;</span></span>  <span class="attribute-name">meta-inf</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">import</span><span class="delimiter">&quot;</span></span> <span class="tag">/&gt;</span>
+            <span class="tag">&lt;/dependencies&gt;</span>
+     <span class="tag">&lt;/deployment&gt;</span>
+<span class="tag">&lt;/jboss-deployment-structure&gt;</span></code></pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_type_safe_configuration">Type-safe configuration</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>DeltaSpike provides a way to directly inject configured values into your
+code via the qualifier <code>@ConfigProperty</code>.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>@ApplicationScoped
+public class SomeRandomService
+{
+    @Inject
+    @ConfigProperty(name = "endpoint.poll.interval")
+    private Integer pollInterval;
+
+    @Inject
+    @ConfigProperty(name = "endpoint.poll.servername")
+    private String pollUrl;
+
+    ...
+ }</pre>
+</div>
+</div>
+</div>
+</div>
+			</div>
+
+			<hr>
+
+			<footer>
+				<p>Copyright © 2011-2014 The Apache Software Foundation,
+					Licensed under the Apache License, Version 2.0.</p>
+				<p>Apache and the Apache feather logo are trademarks of The
+					Apache Software Foundation.</p>
+			</footer>
+
+		</div>
+		<!-- /.container -->
+
+</body>
+</html>
\ No newline at end of file

Added: deltaspike/site/trunk/content/documentation/container-control.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/container-control.html?rev=1624296&view=auto
==============================================================================
--- deltaspike/site/trunk/content/documentation/container-control.html (added)
+++ deltaspike/site/trunk/content/documentation/container-control.html Thu Sep 11 14:16:37 2014
@@ -0,0 +1,429 @@
+<!DOCTYPE html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="description" content="deltaspike-generate-pages">
+<meta name="author" content="chm">
+
+<title>Container &amp; Control</title>
+
+<!-- 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 &quot;License&quot;); 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 &quot;AS IS&quot; 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. -->
+
+<!-- Styles -->
+
+<link href="http://deltaspike.apache.org/resources/css/bootstrap.css" rel="stylesheet">
+<link href="http://deltaspike.apache.org/resources/css/bootstrap-responsive.css" rel="stylesheet">
+
+<style type="text/css">
+/* Foundation stylesheet for CodeRay (to match GitHub theme) | MIT License | http://foundation.zurb.com */
+table.CodeRay { border-collapse: collapse; padding: 2px; margin-bottom: 0; border: 0; background: transparent; }
+table.CodeRay td { padding: 0 .5em; vertical-align: top; }
+table.CodeRay td.line-numbers { text-align: right; color: #999; border-right: 1px solid #e5e5e5; padding-left: 0; }
+span.line-numbers { border-right: 1px solid #E5E5E5; color: #999; display: inline-block; margin-right: 0.5em; padding-right: 0.5em; }
+.CodeRay td.line-numbers strong, .CodeRay span.line-numbers strong { font-weight: normal; }
+.CodeRay .debug { color: white !important; background: blue !important; }
+.CodeRay .annotation { color: #007; }
+.CodeRay .attribute-name { color: #f08; }
+.CodeRay .attribute-value { color: #700; }
+.CodeRay .binary { color: #509; }
+.CodeRay .comment  { color: #999; font-style: italic; }
+.CodeRay .char { color: #04D; }
+.CodeRay .char .content { color: #04D; }
+.CodeRay .char .delimiter { color: #039; }
+.CodeRay .class { color: #458; }
+.CodeRay .complex { color: #A08; }
+.CodeRay .constant { color: teal; }
+.CodeRay .color { color: #0A0; }
+.CodeRay .class-variable { color: #369; }
+.CodeRay .decorator { color: #B0B; }
+.CodeRay .definition { color: #099; }
+.CodeRay .directive { color: #088; }
+.CodeRay .delimiter { color: black; }
+.CodeRay .doc { color: #970; }
+.CodeRay .doctype { color: #34b; }
+.CodeRay .doc-string { color: #D42; }
+.CodeRay .escape  { color: #666; }
+.CodeRay .entity { color: #800; }
+.CodeRay .error { color: #808; }
+.CodeRay .exception { color: #C00; }
+.CodeRay .filename { color: #099; }
+.CodeRay .function { color: #900; }
+.CodeRay .global-variable { color: teal; }
+.CodeRay .hex { color: #058; }
+.CodeRay .integer  { color: #099; }
+.CodeRay .include { color: #B44; }
+.CodeRay .inline { color: black; }
+.CodeRay .inline .inline { background: #ccc; }
+.CodeRay .inline .inline .inline { background: #bbb; }
+.CodeRay .inline .inline-delimiter { color: #D14; }
+.CodeRay .inline-delimiter { color: #D14; }
+.CodeRay .important { color: #f00; }
+.CodeRay .interpreted { color: #B2B; }
+.CodeRay .instance-variable { color: teal; }
+.CodeRay .label { color: #970; }
+.CodeRay .local-variable { color: #963; }
+.CodeRay .octal { color: #40E; }
+.CodeRay .predefined { color: #369; }
+.CodeRay .preprocessor { color: #579; }
+.CodeRay .pseudo-class { color: #00C; }
+.CodeRay .predefined-type { color: #074; }
+.CodeRay .reserved, .keyword  { color: #000; }
+.CodeRay .key { color: #808; }
+.CodeRay .key .delimiter { color: #606; }
+.CodeRay .key .char { color: #80f; }
+.CodeRay .value { color: #088; }
+.CodeRay .regexp { background-color: #fff0ff; }
+.CodeRay .regexp .content { color: #808; }
+.CodeRay .regexp .delimiter { color: #404; }
+.CodeRay .regexp .modifier { color: #C2C; }
+.CodeRay .regexp .function  { color: #404; font-weight: bold; }
+.CodeRay .string { color: #D20; }
+.CodeRay .string .string { }
+.CodeRay .string .string .string { background-color: #ffd0d0; }
+.CodeRay .string .content { color: #D14; }
+.CodeRay .string .char { color: #D14; }
+.CodeRay .string .delimiter { color: #D14; }
+.CodeRay .shell { color: #D14; }
+.CodeRay .shell .content { }
+.CodeRay .shell .delimiter { color: #D14; }
+.CodeRay .symbol { color: #990073; }
+.CodeRay .symbol .content { color: #A60; }
+.CodeRay .symbol .delimiter { color: #630; }
+.CodeRay .tag, .CodeRay .attribute-name { color: #070; }
+.CodeRay .tag-special { color: #D70; }
+.CodeRay .type { color: #339; }
+.CodeRay .variable  { color: #036; }
+.CodeRay .insert { background: #afa; }
+.CodeRay .delete { background: #faa; }
+.CodeRay .change { color: #aaf; background: #007; }
+.CodeRay .head { color: #f8f; background: #505; }
+.CodeRay .insert .insert { color: #080; }
+.CodeRay .delete .delete { color: #800; }
+.CodeRay .change .change { color: #66f; }
+.CodeRay .head .head { color: #f4f; }
+body {
+	padding-top: 60px;
+	padding-bottom: 40px;
+}
+</style>
+<script type="text/javascript">
+
+	  var _gaq = _gaq || [];
+	  _gaq.push(['_setAccount', 'UA-36103647-1']);
+	  _gaq.push(['_trackPageview']);
+	
+	  (function() {
+		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+	  })();
+	
+	</script>
+</head>
+
+<body>
+
+	<div class="navbar navbar-fixed-top">
+		<div class="navbar-inner">
+			<div class="container">
+				<a class="btn btn-navbar" data-toggle="collapse"
+					data-target=".nav-collapse"> <span class="icon-bar"></span> <span
+					class="icon-bar"></span> <span class="icon-bar"></span>
+				</a> <a class="brand logocolor"
+					href="http://deltaspike.apache.org/index.html">Apache
+					DeltaSpike</a>
+				<div class="nav-collapse">
+					<ul class="nav">
+						<li class="active"><a
+							href="http://deltaspike.apache.org/index.html">Home</a></li>
+						<li><a href="http://deltaspike.apache.org/documentation">Documentation</a></li>
+						<li><a href="http://deltaspike.apache.org/source.html">Source</a></li>
+						<li><a href="http://deltaspike.apache.org/download.html">Download</a></li>
+						<li><a href="http://deltaspike.apache.org/community.html">Community</a></li>
+						<!-- <li><a href="./support.html">Support</a></li>  -->
+						<li><a href="http://deltaspike.apache.org/news.html">News</a></li>
+						<li><a
+							href="http://deltaspike.apache.org/migration-guide.html">Migration</a></li>
+					</ul>
+				</div>
+				<!--/.nav-collapse -->
+				<form id="search-form" action="http://www.google.com/search"
+					method="get" class="navbar-search pull-right">
+					<input value="deltaspike.apache.org" name="sitesearch"
+						type="hidden"> <input class="search-query" name="q"
+						id="query" type="text">
+				</form>
+			</div>
+		</div>
+	</div>
+
+	<div class="container">
+		<div class="row">
+			<div class="span12">
+				<div class="page-title">
+			    <h1>Container &amp; Control</h1>
+                </div>
+
+				<div id="toc" class="toc2">
+       	 		<ul class="sectlevel1">
+<li><a href="#_introduction">Introduction</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#_cdicontainer">CdiContainer</a></li>
+<li><a href="#_contextcontrol_usage">ContextControl usage</a></li>
+<li><a href="#_embedded_servlet_support">Embedded Servlet Support</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#_jetty">Jetty</a></li>
+<li><a href="#_undertow">Undertow</a></li>
+<li><a href="#_tomcat">Tomcat</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+       	 		<hr>	
+       	 		
+				<div class="sect1">
+<h2 id="_introduction">Introduction</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>There are basically two parts:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The <code>CdiContainer</code> interface allows to boot and shutdown the CDI container in SE applications.</p>
+</li>
+<li>
+<p>The <code>ContextControl</code> interface allows to control the life-cycle of the built-in contexts of the CDI container.</p>
+</li>
+</ul>
+</div>
+<div class="sect2">
+<h3 id="_cdicontainer">CdiContainer</h3>
+<div class="paragraph">
+<p>You can use the <code>CdiContainerLoader</code> as a simple factory to gain access
+to the underlying <code>CdiContainer</code> implementation. This is of little
+interest for Java EE applications since the CDI Container already gets
+properly booted and shut down by the Servlet container integration.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay"><code class="java language-java"><span class="comment">// this will give you a CdiContainer for Weld or OWB, depending on the jar you added</span>
+CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
+
+<span class="comment">// now we gonna boot the CDI container. This will trigger the classpath scan, etc</span>
+cdiContainer.boot();
+
+<span class="comment">// and finally we like to start all built-in contexts</span>
+cdiContainer.getContextControl().startContexts();
+
+<span class="comment">// now we can use CDI in our SE application.</span>
+<span class="comment">// And there is not a single line of OWB or Weld specific code in your project!</span>
+
+<span class="comment">// finally we gonna stop the container</span>
+cdiContainer.shutdown();</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_contextcontrol_usage">ContextControl usage</h3>
+<div class="paragraph">
+<p>The <code>ContextControl</code> interface allows you to start and stop built-in
+standard Contexts like <code>@RequestScoped</code>, <code>@ConversationScoped</code>,
+<code>@SessionScoped</code>, etc. It is provided as <code>@Dependent</code> bean and can get
+injected in the classic CDI way. This is not only usable in Java SE
+projects but also very helpful in Servlets and Java EE containers.</p>
+</div>
+<div class="paragraph">
+<p><strong>Restarting the RequestContext in unit tests</strong></p>
+</div>
+<div class="paragraph">
+<p>In unit testing it can be necessary to test with attached and also with
+detached JPA entities. A very common approach for JPA is the
+<a href="http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Web_Server/1.0/html/Hibernate_Entity_Manager_Reference_Guide/transactions.html">entitymanager-per-request
+approach</a> and thus have a producer method which creates a @RequestScoped
+EntityManager. Since a single unit test is usually treated as one
+‘request’ a problem arises detaching entities.</p>
+</div>
+<div class="paragraph">
+<p>Using ContextControl to detach entities:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay"><code class="java language-java"><span class="annotation">@Test</span>
+<span class="directive">public</span> <span class="type">void</span> testMyBusinessLogic()
+{
+    doSomeJpaStuff()
+    MyEntity me = em.find(...);
+
+    ContextControl ctxCtrl = BeanProvider.getContextualReference(ContextControl.class);
+
+    <span class="comment">//stopping the request context will dispose the @RequestScoped EntityManager</span>
+    ctxCtrl.stopContext(RequestScoped.class);
+
+    <span class="comment">// and now immediately restart the context again</span>
+    ctxCtrl.startContext(RequestScoped.class);
+
+    <span class="comment">// the entity 'em' is now in a detached state!</span>
+    doSomeStuffWithTheDetachedEntity(em);
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Attaching a Request Context to a new thread in EE</p>
+</div>
+<div class="paragraph">
+<p>Accessing the <code>@RequestScoped</code> bean in a new thread will result in a
+<code>ContextNotActiveException</code>. The request-context usually gets started
+for a particular thread via a simple <code>ServletRequestListener</code>. So "no
+servlet-request" means that there is no Servlet-Context for the current
+(/new) Thread. You might face such issues, if you would like to reuse
+business services in e.g. a Quartz Job.</p>
+</div>
+<div class="paragraph">
+<p>Controlling the request-context for a Quartz-Job:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay"><code class="java language-java"><span class="directive">public</span> <span class="type">class</span> <span class="class">CdiJob</span> <span class="directive">implements</span> org.quartz.Job
+{
+    <span class="directive">public</span> <span class="type">void</span> execute(JobExecutionContext context) <span class="directive">throws</span> JobExecutionException
+    {
+        ContextControl ctxCtrl = BeanProvider.getContextualReference(ContextControl.class);
+
+        <span class="comment">//this will implicitly bind a new RequestContext to the current thread</span>
+        ctxCtrl.startContext(RequestScoped.class);
+
+        <span class="keyword">try</span>
+        {
+            doYourWork();
+        }
+        <span class="keyword">finally</span>
+        {
+            <span class="comment">//stop the RequestContext to ensure that all request-scoped beans get cleaned up.</span>
+            ctxCtrl.stopContext(RequestScoped.class);
+        }
+    }
+}</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_embedded_servlet_support">Embedded Servlet Support</h3>
+<div class="paragraph">
+<p>Starting with 1.0.2, you can use DeltaSpike to power embedded Servlet
+runtimes. This work is done via Servlet Listeners. The configuration is
+specific to each container, below are some examples.</p>
+</div>
+<div class="paragraph">
+<p>The two main listeners are <code>CdiServletRequestListener</code> and
+<code>CdiServletContextListener</code>. <code>CdiServletRequestListener</code> is responsible
+for starting a <code>RequestContext</code> on each incoming request. In most
+containers this is all you need. For Tomcat specifically, you need to
+use <code>CdiServletContextListener</code> which registers the
+<code>CdiServletRequestListener</code>.</p>
+</div>
+<div class="paragraph">
+<p>The main usecase for this feature is for lightweight embedded runtimes,
+microservices. For each of these, it is assumed that you are using the
+following start up code somewhere:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay"><code class="java language-java">CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
+cdiContainer.boot();
+cdiContainer.getContextControl().startContexts();</code></pre>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_jetty">Jetty</h4>
+<div class="paragraph">
+<p>For Jetty, you need to add an <code>EventListener</code> which will be your
+<code>CdiServletRequestListener</code>. The object must be instantiated. This must
+be done before the server is started.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay"><code class="java language-java">Server server = <span class="keyword">new</span> Server(port);
+ServletContextHandler context = <span class="keyword">new</span> ServletContextHandler(ServletContextHandler.SESSIONS);
+context.setContextPath(<span class="string"><span class="delimiter">&quot;</span><span class="content">/</span><span class="delimiter">&quot;</span></span>);
+server.setHandler(context);
+
+context.addEventListener(<span class="keyword">new</span> CdiServletRequestListener());
+context.addServlet(<span class="keyword">new</span> ServletHolder(<span class="keyword">new</span> YourServlet()),<span class="string"><span class="delimiter">&quot;</span><span class="content">/*</span><span class="delimiter">&quot;</span></span>);
+
+server.start();</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_undertow">Undertow</h4>
+<div class="paragraph">
+<p>For Undertow, you register the <code>CdiServletRequestListener</code> via
+<code>ListenerInfo</code> by passing in the class to their builders. Then you add
+the <code>ListenerInfo</code> to your deployment before starting.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay"><code class="java language-java">ServletInfo servletInfo = Servlets.servlet(<span class="string"><span class="delimiter">&quot;</span><span class="content">YourServletName</span><span class="delimiter">&quot;</span></span>, YourServlet.class).setAsyncSupported(<span class="predefined-constant">true</span>)
+    .setLoadOnStartup(<span class="integer">1</span>).addMapping(<span class="string"><span class="delimiter">&quot;</span><span class="content">/*</span><span class="delimiter">&quot;</span></span>);
+ListenerInfo listenerInfo = Servlets.listener(CdiServletRequestListener.class);
+DeploymentInfo di = <span class="keyword">new</span> DeploymentInfo()
+        .addListener(listenerInfo)
+        .setContextPath(<span class="string"><span class="delimiter">&quot;</span><span class="content">/</span><span class="delimiter">&quot;</span></span>)
+        .addServlet(servletInfo).setDeploymentName(<span class="string"><span class="delimiter">&quot;</span><span class="content">CdiSEServlet</span><span class="delimiter">&quot;</span></span>)
+        .setClassLoader(<span class="predefined-type">ClassLoader</span>.getSystemClassLoader());
+DeploymentManager deploymentManager = Servlets.defaultContainer().addDeployment(di);
+deploymentManager.deploy();
+Undertow server = Undertow.builder()
+        .addHttpListener(port, <span class="string"><span class="delimiter">&quot;</span><span class="content">localhost</span><span class="delimiter">&quot;</span></span>)
+        .setHandler(deploymentManager.start())
+        .build();
+server.start();</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_tomcat">Tomcat</h4>
+<div class="paragraph">
+<p>For Tomcat, you need to register the <code>CdiServletContextListener</code> instead
+of the <code>CdiServletRequestListener</code>. It is added as an
+<code>ApplicationListener</code> by passing in the class name as a <code>String</code>.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay"><code class="java language-java">Tomcat tomcat = <span class="keyword">new</span> Tomcat();
+tomcat.setPort(port);
+<span class="predefined-type">File</span> base = <span class="keyword">new</span> <span class="predefined-type">File</span>(<span class="string"><span class="delimiter">&quot;</span><span class="content">...</span><span class="delimiter">&quot;</span></span>);
+<span class="predefined-type">Context</span> ctx = tomcat.addContext(<span class="string"><span class="delimiter">&quot;</span><span class="content">/</span><span class="delimiter">&quot;</span></span>,base.getAbsolutePath());
+StandardContext standardContext = (StandardContext)ctx;
+standardContext.addApplicationListener(CdiServletContextListener.class.getName());
+Wrapper wrapper = Tomcat.addServlet(ctx,<span class="string"><span class="delimiter">&quot;</span><span class="content">YourServlet</span><span class="delimiter">&quot;</span></span>,YourServlet.class.getName());
+wrapper.addMapping(<span class="string"><span class="delimiter">&quot;</span><span class="content">/*</span><span class="delimiter">&quot;</span></span>);
+tomcat.start();</code></pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+</div>
+			</div>
+
+			<hr>
+
+			<footer>
+				<p>Copyright © 2011-2014 The Apache Software Foundation,
+					Licensed under the Apache License, Version 2.0.</p>
+				<p>Apache and the Apache feather logo are trademarks of The
+					Apache Software Foundation.</p>
+			</footer>
+
+		</div>
+		<!-- /.container -->
+
+</body>
+</html>
\ No newline at end of file



Mime
View raw message