You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by ra...@apache.org on 2014/12/30 19:51:53 UTC

svn commit: r1648574 [9/9] - /deltaspike/site/trunk/content/staging/documentation/

Added: deltaspike/site/trunk/content/staging/documentation/source.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/staging/documentation/source.html?rev=1648574&view=auto
==============================================================================
--- deltaspike/site/trunk/content/staging/documentation/source.html (added)
+++ deltaspike/site/trunk/content/staging/documentation/source.html Tue Dec 30 18:51:52 2014
@@ -0,0 +1,315 @@
+<!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">
+<!-- No caching headers -->
+<meta http-equiv="cache-control" content="no-cache" />
+<meta http-equiv="pragma" content="no-cache" />
+<meta http-equiv="expires" content="-1" />
+
+<title>Contribute to the DeltaSpike 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="https://deltaspike.apache.org/resources/css/bootstrap.css" rel="stylesheet">
+<link href="https://deltaspike.apache.org/resources/css/bootstrap-responsive.css" rel="stylesheet">
+<link href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.1.0/css/font-awesome.min.css" rel="stylesheet" >
+
+<style type="text/css">
+/* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */
+/*pre.CodeRay {background-color:#f7f7f8;}*/
+.CodeRay .line-numbers{border-right:1px solid #d8d8d8;padding:0 0.5em 0 .25em}
+.CodeRay span.line-numbers{display:inline-block;margin-right:.5em;color:rgba(0,0,0,.3)}
+.CodeRay .line-numbers strong{font-weight: normal}
+table.CodeRay{border-collapse:separate;border-spacing:0;margin-bottom:0;border:0;background:none}
+table.CodeRay td{vertical-align: top}
+table.CodeRay td.line-numbers{text-align:right}
+table.CodeRay td.line-numbers>pre{padding:0;color:rgba(0,0,0,.3)}
+table.CodeRay td.code{padding:0 0 0 .5em}
+table.CodeRay td.code>pre{padding:0}
+.CodeRay .debug{color:#fff !important;background:#000080 !important}
+.CodeRay .annotation{color:#007}
+.CodeRay .attribute-name{color:#000080}
+.CodeRay .attribute-value{color:#700}
+.CodeRay .binary{color:#509}
+.CodeRay .comment{color:#998;font-style:italic}
+.CodeRay .char{color:#04d}
+.CodeRay .char .content{color:#04d}
+.CodeRay .char .delimiter{color:#039}
+.CodeRay .class{color:#458;font-weight:bold}
+.CodeRay .complex{color:#a08}
+.CodeRay .constant,.CodeRay .predefined-constant{color:#008080}
+.CodeRay .color{color:#099}
+.CodeRay .class-variable{color:#369}
+.CodeRay .decorator{color:#b0b}
+.CodeRay .definition{color:#099}
+.CodeRay .delimiter{color:#000}
+.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:inherit}
+.CodeRay .filename{color:#099}
+.CodeRay .function{color:#900;font-weight:bold}
+.CodeRay .global-variable{color:#008080}
+.CodeRay .hex{color:#058}
+.CodeRay .integer,.CodeRay .float{color:#099}
+.CodeRay .include{color:#555}
+.CodeRay .inline{color:#00}
+.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:#555;font-weight:bold}
+.CodeRay .interpreted{color:#b2b}
+.CodeRay .instance-variable{color:#008080}
+.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:#555}
+.CodeRay .directive{font-weight:bold}
+.CodeRay .type{font-weight:bold}
+.CodeRay .predefined-type{color:inherit}
+.CodeRay .reserved,.CodeRay .keyword {color:#000;font-weight:bold}
+.CodeRay .key{color:#808}
+.CodeRay .key .delimiter{color:#606}
+.CodeRay .key .char{color:#80f}
+.CodeRay .value{color:#088}
+.CodeRay .regexp .delimiter{color:#808}
+.CodeRay .regexp .content{color:#808}
+.CodeRay .regexp .modifier{color:#808}
+.CodeRay .regexp .char{color:#d14}
+.CodeRay .regexp .function{color:#404;font-weight:bold}
+.CodeRay .string{color:#d20}
+.CodeRay .string .string .string{background:#ffd0d0}
+.CodeRay .string .content{color:#d14}
+.CodeRay .string .char{color:#d14}
+.CodeRay .string .delimiter{color:#d14}
+.CodeRay .shell{color:#d14}
+.CodeRay .shell .delimiter{color:#d14}
+.CodeRay .symbol{color:#990073}
+.CodeRay .symbol .content{color:#a60}
+.CodeRay .symbol .delimiter{color:#630}
+.CodeRay .tag{color:#008080}
+.CodeRay .tag-special{color:#d70}
+.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="../index.html">Apache DeltaSpike</a>
+				<div class="nav-collapse">
+					<ul class="nav">
+						<li class="active"><a
+							href="../index.html">Home</a></li>
+						<li><a href="../documentation">Documentation</a></li>
+						<li><a href="../javadoc.html">Javadoc</a></li>
+						<li><a href="../documentation/source.html">Source</a></li>
+						<li><a href="../download.html">Download</a></li>
+						<li><a href="../community.html">Community</a></li>
+						<!-- <li><a href="./support.html">Support</a></li>  -->
+						<li><a href="../news.html">News</a></li>
+						<li><a href="../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>Contribute to the DeltaSpike Source</h1>
+                </div>
+
+				<div id="toc" class="toc">
+       	 		<ul class="sectlevel1">
+<li><a href="#_1_get_the_source">1. Get the Source</a></li>
+<li><a href="#_2_make_additions_and_changes_to_the_source">2. Make Additions and Changes to the Source</a>
+<ul class="sectlevel2">
+<li><a href="#_intellij">IntelliJ</a></li>
+<li><a href="#_eclipse">Eclipse</a></li>
+</ul>
+</li>
+<li><a href="#_3_build_the_source">3. Build the Source</a></li>
+<li><a href="#_4_make_a_pull_request">4. Make a Pull Request</a></li>
+<li><a href="#_git_resources">Git Resources</a></li>
+</ul>
+       	 		<hr>	
+       	 		
+				<div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>If you are looking to contribute to the DeltaSpike source, you must start with the latest version of the code base. DeltaSpike source is stored in the Apache Git repository at <a href="https://git-wip-us.apache.org/repos/asf/deltaspike.git" class="bare">https://git-wip-us.apache.org/repos/asf/deltaspike.git</a></p>
+</div>
+<div class="paragraph">
+<p>It is also important that you follow the git workflows we have established for the project to ensure efficient and clean collaboration as detailed here.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_1_get_the_source">1. Get the Source</h2>
+<div class="sectionbody">
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>Checkout the source</p>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>git clone https://git-wip-us.apache.org/repos/asf/deltaspike.git</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>or for a read-only mirror version</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>git clone https://github.com/apache/deltaspike</code></pre>
+</div>
+</div>
+</li>
+<li>
+<p>Update the repository clone</p>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>git pull --rebase</code></pre>
+</div>
+</div>
+</li>
+</ol>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_2_make_additions_and_changes_to_the_source">2. Make Additions and Changes to the Source</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Commits (and in the best case also patches), have to follow our
+"formatting rules". The following section provides settings for IDEs
+used by us.</p>
+</div>
+<div class="sect2">
+<h3 id="_intellij">IntelliJ</h3>
+<div class="paragraph">
+<p><a href="http://deltaspike.apache.org/resources/files/settings.jar">Attached</a> you can find the settings
+for formatting the source code. Import them via File | Import
+Settings</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_eclipse">Eclipse</h3>
+<div class="paragraph">
+<p>For Eclipse you can use this
+<a href="http://deltaspike.apache.org/resources/files/deltaspike-code-conventions.xml">Code Formatter Profile</a>. Import it via Window | Preferences | Java | Code Style | Formatter</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_3_build_the_source">3. Build the Source</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Always build and test your changes before you make pull requests to the DeltaSpike repository. For instructions on building the source and running Arquillian tests, see <a href="build.html">Build and Test DeltaSpike from Source</a>.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_4_make_a_pull_request">4. Make a Pull Request</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Ensure your commits and pull requests follow the our established <a href="https://deltaspike.apache.org/suggested-git-workflows.html">DeltaSpike GIT workflow</a>.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_git_resources">Git Resources</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>For general information about Git and using Git, see the following:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="http://wiki.apache.org/couchdb/Git_At_Apache_Guide">Git At Apache Guide</a></p>
+</li>
+<li>
+<p><a href="http://git-wip-us.apache.org">Git at The ASF</a></p>
+</li>
+<li>
+<p><a href="http://git.or.cz/course/svn.html">Git - SVN Crash Course</a></p>
+</li>
+<li>
+<p><a href="http://git-scm.com/book">Pro Git</a></p>
+</li>
+<li>
+<p><a href="https://help.github.com/articles/which-remote-url-should-i-use">GitHub: Which remote URL should I use?</a></p>
+</li>
+</ul>
+</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/staging/documentation/spi.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/staging/documentation/spi.html?rev=1648574&view=auto
==============================================================================
--- deltaspike/site/trunk/content/staging/documentation/spi.html (added)
+++ deltaspike/site/trunk/content/staging/documentation/spi.html Tue Dec 30 18:51:52 2014
@@ -0,0 +1,319 @@
+<!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">
+<!-- No caching headers -->
+<meta http-equiv="cache-control" content="no-cache" />
+<meta http-equiv="pragma" content="no-cache" />
+<meta http-equiv="expires" content="-1" />
+
+<title>DeltaSpike Service Provider Interface (SPI)</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="https://deltaspike.apache.org/resources/css/bootstrap.css" rel="stylesheet">
+<link href="https://deltaspike.apache.org/resources/css/bootstrap-responsive.css" rel="stylesheet">
+<link href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.1.0/css/font-awesome.min.css" rel="stylesheet" >
+
+<style type="text/css">
+/* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */
+/*pre.CodeRay {background-color:#f7f7f8;}*/
+.CodeRay .line-numbers{border-right:1px solid #d8d8d8;padding:0 0.5em 0 .25em}
+.CodeRay span.line-numbers{display:inline-block;margin-right:.5em;color:rgba(0,0,0,.3)}
+.CodeRay .line-numbers strong{font-weight: normal}
+table.CodeRay{border-collapse:separate;border-spacing:0;margin-bottom:0;border:0;background:none}
+table.CodeRay td{vertical-align: top}
+table.CodeRay td.line-numbers{text-align:right}
+table.CodeRay td.line-numbers>pre{padding:0;color:rgba(0,0,0,.3)}
+table.CodeRay td.code{padding:0 0 0 .5em}
+table.CodeRay td.code>pre{padding:0}
+.CodeRay .debug{color:#fff !important;background:#000080 !important}
+.CodeRay .annotation{color:#007}
+.CodeRay .attribute-name{color:#000080}
+.CodeRay .attribute-value{color:#700}
+.CodeRay .binary{color:#509}
+.CodeRay .comment{color:#998;font-style:italic}
+.CodeRay .char{color:#04d}
+.CodeRay .char .content{color:#04d}
+.CodeRay .char .delimiter{color:#039}
+.CodeRay .class{color:#458;font-weight:bold}
+.CodeRay .complex{color:#a08}
+.CodeRay .constant,.CodeRay .predefined-constant{color:#008080}
+.CodeRay .color{color:#099}
+.CodeRay .class-variable{color:#369}
+.CodeRay .decorator{color:#b0b}
+.CodeRay .definition{color:#099}
+.CodeRay .delimiter{color:#000}
+.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:inherit}
+.CodeRay .filename{color:#099}
+.CodeRay .function{color:#900;font-weight:bold}
+.CodeRay .global-variable{color:#008080}
+.CodeRay .hex{color:#058}
+.CodeRay .integer,.CodeRay .float{color:#099}
+.CodeRay .include{color:#555}
+.CodeRay .inline{color:#00}
+.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:#555;font-weight:bold}
+.CodeRay .interpreted{color:#b2b}
+.CodeRay .instance-variable{color:#008080}
+.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:#555}
+.CodeRay .directive{font-weight:bold}
+.CodeRay .type{font-weight:bold}
+.CodeRay .predefined-type{color:inherit}
+.CodeRay .reserved,.CodeRay .keyword {color:#000;font-weight:bold}
+.CodeRay .key{color:#808}
+.CodeRay .key .delimiter{color:#606}
+.CodeRay .key .char{color:#80f}
+.CodeRay .value{color:#088}
+.CodeRay .regexp .delimiter{color:#808}
+.CodeRay .regexp .content{color:#808}
+.CodeRay .regexp .modifier{color:#808}
+.CodeRay .regexp .char{color:#d14}
+.CodeRay .regexp .function{color:#404;font-weight:bold}
+.CodeRay .string{color:#d20}
+.CodeRay .string .string .string{background:#ffd0d0}
+.CodeRay .string .content{color:#d14}
+.CodeRay .string .char{color:#d14}
+.CodeRay .string .delimiter{color:#d14}
+.CodeRay .shell{color:#d14}
+.CodeRay .shell .delimiter{color:#d14}
+.CodeRay .symbol{color:#990073}
+.CodeRay .symbol .content{color:#a60}
+.CodeRay .symbol .delimiter{color:#630}
+.CodeRay .tag{color:#008080}
+.CodeRay .tag-special{color:#d70}
+.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="../index.html">Apache DeltaSpike</a>
+				<div class="nav-collapse">
+					<ul class="nav">
+						<li class="active"><a
+							href="../index.html">Home</a></li>
+						<li><a href="../documentation">Documentation</a></li>
+						<li><a href="../javadoc.html">Javadoc</a></li>
+						<li><a href="../documentation/source.html">Source</a></li>
+						<li><a href="../download.html">Download</a></li>
+						<li><a href="../community.html">Community</a></li>
+						<!-- <li><a href="./support.html">Support</a></li>  -->
+						<li><a href="../news.html">News</a></li>
+						<li><a href="../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 Service Provider Interface (SPI)</h1>
+                </div>
+
+				<div id="toc" class="toc">
+       	 		<ul class="sectlevel1">
+<li><a href="#_deactivatable">Deactivatable</a>
+<ul class="sectlevel2">
+<li><a href="#_classdeactivator">ClassDeactivator</a></li>
+</ul>
+</li>
+<li><a href="#_configsource">ConfigSource</a>
+<ul class="sectlevel2">
+<li><a href="#_configsourceprovider">ConfigSourceProvider</a></li>
+<li><a href="#_baseconfigpropertyproducer">BaseConfigPropertyProducer</a></li>
+</ul>
+</li>
+<li><a href="#_interceptorstrategy">InterceptorStrategy</a></li>
+<li><a href="#_global_alternative">Global Alternative</a></li>
+</ul>
+       	 		<hr>	
+       	 		
+				<div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>DeltaSpike provides an Service Provider Interface (SPI) to enable you to extend it.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_deactivatable">Deactivatable</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This mechanism is only used for artifacts <strong>like</strong> implementations of (<code>javax.enterprise.inject.spi.Extension</code>) which <strong>cais not</strong> be deactivated with standard CDI mechanisms.</p>
+</div>
+<div class="paragraph">
+<p>This interface is just a marker interface which is implemented by all pre-configured DeltaSpike artifacts which can be deactivated manually (e.g. to improve the performance if a part isis not needed, to provide a custom implementation if the default implementation isis not pluggable by default or to bypass an implementation which causes an issue (in this case please also <strong>contact us</strong> and we will fix it)).</p>
+</div>
+<div class="paragraph">
+<p>To deactivate a class it is required to implement <code>ClassDeactivator</code>. Returning 'false' or 'true' allows to de-/activate the class in question. Retuning null means that the current class-deactivator doesis not have information about the class in question and cais not provide a result. Since <code>ClassDeactivator</code> implementations are configured with the low-level configuration of DeltaSpike, the class-deactivator with the highest ordinal has the final decision. DeltaSpike itself doesis not deactivate an implementation, however, an add-on or a third-party portable CDI extension based on DeltaSpike (Core+) can use the concept to deactivate a default implementation of DeltaSpike in favour of its own implementation.</p>
+</div>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+Due to the ordinal feature of the low-level configuration approach it is possible that a class-deactivator with a higher ordinal, for example used in a concrete project, can re-activate a deactivated implementation.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p><strong>Please note</strong> that you might have to deactivate the parts of the add-on or third-party CDI extension which relies on its own implementation. Therefore, you should <strong>be really careful with re-activation</strong>.) The implementation should be stateless because the result will be cached and
+as soon as everything is initialized the class-deactivators will not be used any longer.</p>
+</div>
+<div class="sect2">
+<h3 id="_classdeactivator">ClassDeactivator</h3>
+<div class="paragraph">
+<p>A class-deactivator allows to specify deactivated classes.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="comment">//This class needs to be configured via one of the supported configuration sources!</span>
+<span class="directive">public</span> <span class="type">class</span> <span class="class">CustomClassDeactivator</span> <span class="directive">implements</span> ClassDeactivator
+{
+    <span class="annotation">@Override</span>
+    <span class="directive">public</span> <span class="predefined-type">Boolean</span> isActivated(<span class="predefined-type">Class</span>&lt;? <span class="directive">extends</span> Deactivatable&gt; targetClass)
+    {
+        <span class="keyword">if</span> (targetClass.equals(MyClass.class))
+        {
+            <span class="keyword">return</span> <span class="predefined-type">Boolean</span>.FALSE;
+        }
+        <span class="keyword">return</span> <span class="predefined-constant">null</span>; <span class="comment">//no result for the given class</span>
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A class-deactivator will be resolved from the environment via the default resolvers or via a custom resolver which allows to use any type of configuration-format. (see <code>org.apache.deltaspike.core.api.config.ConfigResolver</code>). The key is the fully qualified name of the interface (<code>org.apache.deltaspike.core.spi.activation.ClassDeactivator</code>).</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_configsource">ConfigSource</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_configsourceprovider">ConfigSourceProvider</h3>
+
+</div>
+<div class="sect2">
+<h3 id="_baseconfigpropertyproducer">BaseConfigPropertyProducer</h3>
+
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_interceptorstrategy">InterceptorStrategy</h2>
+<div class="sectionbody">
+
+</div>
+</div>
+<div class="sect1">
+<h2 id="_global_alternative">Global Alternative</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>There are several application servers (using CDI 1.0) which cais not handle alternative CDI beans correctly (e.g. due to a too strict interpretation or a broken implementation). Therefore, DeltaSpike allows to use the standard <code>@Alternative</code> annotation and an additional configuration entry for DeltaSpike which allows to use the alternative implementation as a global alternative.</p>
+</div>
+<div class="listingblock">
+<div class="title">Standard CDI alternative implementation (without the required XML config)</div>
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">class</span> <span class="class">CustomBean</span>
+{
+}
+
+<span class="annotation">@Alternative</span>
+<span class="comment">//...</span>
+<span class="directive">public</span> <span class="type">class</span> <span class="class">AlternativeCustomBean</span> <span class="directive">extends</span> CustomBean
+{
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Instead of configuring the alternative in the beans.xml, a global alternative needs to be configured in /META-INF/apache-deltaspike.properties. CDI 1.1 should fix this issue and migrating to it means to remove the configuration entry for DeltaSpike again and move to the standard CDI configuration approach.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>custom.CustomBean=custom.AlternativeCustomBean</code></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/staging/documentation/test-control.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/staging/documentation/test-control.html?rev=1648574&view=auto
==============================================================================
--- deltaspike/site/trunk/content/staging/documentation/test-control.html (added)
+++ deltaspike/site/trunk/content/staging/documentation/test-control.html Tue Dec 30 18:51:52 2014
@@ -0,0 +1,802 @@
+<!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">
+<!-- No caching headers -->
+<meta http-equiv="cache-control" content="no-cache" />
+<meta http-equiv="pragma" content="no-cache" />
+<meta http-equiv="expires" content="-1" />
+
+<title>Test-Control 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="https://deltaspike.apache.org/resources/css/bootstrap.css" rel="stylesheet">
+<link href="https://deltaspike.apache.org/resources/css/bootstrap-responsive.css" rel="stylesheet">
+<link href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.1.0/css/font-awesome.min.css" rel="stylesheet" >
+
+<style type="text/css">
+/* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */
+/*pre.CodeRay {background-color:#f7f7f8;}*/
+.CodeRay .line-numbers{border-right:1px solid #d8d8d8;padding:0 0.5em 0 .25em}
+.CodeRay span.line-numbers{display:inline-block;margin-right:.5em;color:rgba(0,0,0,.3)}
+.CodeRay .line-numbers strong{font-weight: normal}
+table.CodeRay{border-collapse:separate;border-spacing:0;margin-bottom:0;border:0;background:none}
+table.CodeRay td{vertical-align: top}
+table.CodeRay td.line-numbers{text-align:right}
+table.CodeRay td.line-numbers>pre{padding:0;color:rgba(0,0,0,.3)}
+table.CodeRay td.code{padding:0 0 0 .5em}
+table.CodeRay td.code>pre{padding:0}
+.CodeRay .debug{color:#fff !important;background:#000080 !important}
+.CodeRay .annotation{color:#007}
+.CodeRay .attribute-name{color:#000080}
+.CodeRay .attribute-value{color:#700}
+.CodeRay .binary{color:#509}
+.CodeRay .comment{color:#998;font-style:italic}
+.CodeRay .char{color:#04d}
+.CodeRay .char .content{color:#04d}
+.CodeRay .char .delimiter{color:#039}
+.CodeRay .class{color:#458;font-weight:bold}
+.CodeRay .complex{color:#a08}
+.CodeRay .constant,.CodeRay .predefined-constant{color:#008080}
+.CodeRay .color{color:#099}
+.CodeRay .class-variable{color:#369}
+.CodeRay .decorator{color:#b0b}
+.CodeRay .definition{color:#099}
+.CodeRay .delimiter{color:#000}
+.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:inherit}
+.CodeRay .filename{color:#099}
+.CodeRay .function{color:#900;font-weight:bold}
+.CodeRay .global-variable{color:#008080}
+.CodeRay .hex{color:#058}
+.CodeRay .integer,.CodeRay .float{color:#099}
+.CodeRay .include{color:#555}
+.CodeRay .inline{color:#00}
+.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:#555;font-weight:bold}
+.CodeRay .interpreted{color:#b2b}
+.CodeRay .instance-variable{color:#008080}
+.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:#555}
+.CodeRay .directive{font-weight:bold}
+.CodeRay .type{font-weight:bold}
+.CodeRay .predefined-type{color:inherit}
+.CodeRay .reserved,.CodeRay .keyword {color:#000;font-weight:bold}
+.CodeRay .key{color:#808}
+.CodeRay .key .delimiter{color:#606}
+.CodeRay .key .char{color:#80f}
+.CodeRay .value{color:#088}
+.CodeRay .regexp .delimiter{color:#808}
+.CodeRay .regexp .content{color:#808}
+.CodeRay .regexp .modifier{color:#808}
+.CodeRay .regexp .char{color:#d14}
+.CodeRay .regexp .function{color:#404;font-weight:bold}
+.CodeRay .string{color:#d20}
+.CodeRay .string .string .string{background:#ffd0d0}
+.CodeRay .string .content{color:#d14}
+.CodeRay .string .char{color:#d14}
+.CodeRay .string .delimiter{color:#d14}
+.CodeRay .shell{color:#d14}
+.CodeRay .shell .delimiter{color:#d14}
+.CodeRay .symbol{color:#990073}
+.CodeRay .symbol .content{color:#a60}
+.CodeRay .symbol .delimiter{color:#630}
+.CodeRay .tag{color:#008080}
+.CodeRay .tag-special{color:#d70}
+.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="../index.html">Apache DeltaSpike</a>
+				<div class="nav-collapse">
+					<ul class="nav">
+						<li class="active"><a
+							href="../index.html">Home</a></li>
+						<li><a href="../documentation">Documentation</a></li>
+						<li><a href="../javadoc.html">Javadoc</a></li>
+						<li><a href="../documentation/source.html">Source</a></li>
+						<li><a href="../download.html">Download</a></li>
+						<li><a href="../community.html">Community</a></li>
+						<!-- <li><a href="./support.html">Support</a></li>  -->
+						<li><a href="../news.html">News</a></li>
+						<li><a href="../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>Test-Control Module</h1>
+                </div>
+
+				<div id="toc" class="toc">
+       	 		<ul class="sectlevel1">
+<li><a href="#_overview">Overview</a></li>
+<li><a href="#_configure_your_projects">Configure Your Projects</a>
+<ul class="sectlevel2">
+<li><a href="#_1_declare_test_control_module_dependencies">1. Declare Test-Control Module Dependencies</a></li>
+<li><a href="#_2_declare_cdi_implemetation_specific_test_control_module_dependencies">2. Declare CDI Implemetation-specific Test-Control Module Dependencies</a>
+<ul class="sectlevel3">
+<li><a href="#_openwebbeans">OpenWebBeans</a></li>
+<li><a href="#_weld">Weld</a></li>
+<li><a href="#_openejb">OpenEJB</a></li>
+</ul>
+</li>
+<li><a href="#_3_complete_additional_project_configuration">3. Complete Additional Project Configuration</a></li>
+</ul>
+</li>
+<li><a href="#_use_the_module_features">Use the Module Features</a>
+<ul class="sectlevel2">
+<li><a href="#_automated_container_booting_and_shutdown">Automated Container Booting and Shutdown</a>
+<ul class="sectlevel3">
+<li><a href="#_cditestrunner">CdiTestRunner</a></li>
+<li><a href="#_cditestsuiterunner">CdiTestSuiteRunner</a></li>
+<li><a href="#_optional_shutdown_configuration">Optional Shutdown Configuration</a></li>
+</ul>
+</li>
+<li><a href="#_test_customization">Test Customization</a>
+<ul class="sectlevel3">
+<li><a href="#__testcontrol">@TestControl</a></li>
+<li><a href="#_projectstage_control">ProjectStage Control</a></li>
+</ul>
+</li>
+<li><a href="#_optional_configuration">Optional Configuration</a>
+<ul class="sectlevel3">
+<li><a href="#_reconfigure_the_config_file_name_or_location">Reconfigure the config-file Name or Location</a></li>
+</ul>
+</li>
+<li><a href="#_optional_integrations">Optional Integrations</a>
+<ul class="sectlevel3">
+<li><a href="#_mock_frameworks">Mock Frameworks</a></li>
+<li><a href="#_jsf_via_myfaces_test">JSF (via MyFaces-Test)</a></li>
+</ul>
+</li>
+<li><a href="#_mixed_tests">Mixed Tests</a></li>
+<li><a href="#_known_restrictions">Known Restrictions</a>
+<ul class="sectlevel3">
+<li><a href="#_liquibase">Liquibase</a></li>
+</ul>
+</li>
+<li><a href="#_spi">SPI</a>
+<ul class="sectlevel3">
+<li><a href="#_externalcontainer">ExternalContainer</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+       	 		<hr>	
+       	 		
+				<div class="sect1">
+<h2 id="_overview">Overview</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The Test-Control module enables you to write CDI-based tests easily. Calls to stop and start the CDI container are built into the Test-Control API, with simplified commands for customizing the management of contexts and other aspects during testing.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_configure_your_projects">Configure Your Projects</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The configuration information provided here is for Maven-based projects and it assumes that you have already declared the DeltaSpike version and DeltaSpike Core module for your projects, as detailed in <a href="configure.html">Configure DeltaSpike in Your Projects</a>. For Maven-independent projects, see <a href="configure.html#config-maven-indep">Configure DeltaSpike in Maven-independent Projects</a>.</p>
+</div>
+<div class="sect2">
+<h3 id="_1_declare_test_control_module_dependencies">1. Declare Test-Control Module Dependencies</h3>
+<div class="paragraph">
+<p>Add the Test-Control module to the list of dependencies in the project <code>pom.xml</code> file using this code snippet:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;dependency&gt;</span>
+    <span class="tag">&lt;groupId&gt;</span>org.apache.deltaspike.modules<span class="tag">&lt;/groupId&gt;</span>
+    <span class="tag">&lt;artifactId&gt;</span>deltaspike-test-control-module-api<span class="tag">&lt;/artifactId&gt;</span>
+    <span class="tag">&lt;version&gt;</span>${deltaspike.version}<span class="tag">&lt;/version&gt;</span>
+    <span class="tag">&lt;scope&gt;</span>test<span class="tag">&lt;/scope&gt;</span>
+<span class="tag">&lt;/dependency&gt;</span>
+
+<span class="tag">&lt;dependency&gt;</span>
+    <span class="tag">&lt;groupId&gt;</span>org.apache.deltaspike.modules<span class="tag">&lt;/groupId&gt;</span>
+    <span class="tag">&lt;artifactId&gt;</span>deltaspike-test-control-module-impl<span class="tag">&lt;/artifactId&gt;</span>
+    <span class="tag">&lt;version&gt;</span>${deltaspike.version}<span class="tag">&lt;/version&gt;</span>
+    <span class="tag">&lt;scope&gt;</span>test<span class="tag">&lt;/scope&gt;</span>
+<span class="tag">&lt;/dependency&gt;</span></code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_2_declare_cdi_implemetation_specific_test_control_module_dependencies">2. Declare CDI Implemetation-specific Test-Control Module Dependencies</h3>
+<div class="paragraph">
+<p>The Test-Control module uses the Container-Control module, requiring a implementation-specific Container Control module to be declared in the project <code>pom.xml</code> file. Choose the appropriate option from those listed here.</p>
+</div>
+<div class="sect3">
+<h4 id="_openwebbeans">OpenWebBeans</h4>
+<div class="paragraph">
+<p>If you are using OpenWebBeans, add the OpenWebBeans-specific Container Control module to the list of dependencies:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="xml"> <span class="tag">&lt;dependency&gt;</span>
+     <span class="tag">&lt;groupId&gt;</span>org.apache.deltaspike.cdictrl<span class="tag">&lt;/groupId&gt;</span>
+     <span class="tag">&lt;artifactId&gt;</span>deltaspike-cdictrl-owb<span class="tag">&lt;/artifactId&gt;</span>
+     <span class="tag">&lt;version&gt;</span>${deltaspike.version}<span class="tag">&lt;/version&gt;</span>
+     <span class="tag">&lt;scope&gt;</span>test<span class="tag">&lt;/scope&gt;</span>
+ <span class="tag">&lt;/dependency&gt;</span></code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_weld">Weld</h4>
+<div class="paragraph">
+<p>If you are using Weld, add the Weld-specific Container Control module to the list of dependencies:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;dependency&gt;</span>
+    <span class="tag">&lt;groupId&gt;</span>org.apache.deltaspike.cdictrl<span class="tag">&lt;/groupId&gt;</span>
+    <span class="tag">&lt;artifactId&gt;</span>deltaspike-cdictrl-weld<span class="tag">&lt;/artifactId&gt;</span>
+    <span class="tag">&lt;version&gt;</span>${deltaspike.version}<span class="tag">&lt;/version&gt;</span>
+    <span class="tag">&lt;scope&gt;</span>test<span class="tag">&lt;/scope&gt;</span>
+<span class="tag">&lt;/dependency&gt;</span></code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_openejb">OpenEJB</h4>
+<div class="paragraph">
+<p>If you are using OpenWebBeans as the CDI implementation and you need to test
+EJBs as well, add the OpenEJB-specific Container Control module to the list
+of dependencies instead of the OpenWebBeans-specific Container Control module:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;dependency&gt;</span>
+    <span class="tag">&lt;groupId&gt;</span>org.apache.deltaspike.cdictrl<span class="tag">&lt;/groupId&gt;</span>
+    <span class="tag">&lt;artifactId&gt;</span>deltaspike-cdictrl-openejb<span class="tag">&lt;/artifactId&gt;</span>
+    <span class="tag">&lt;version&gt;</span>${deltaspike.version}<span class="tag">&lt;/version&gt;</span>
+    <span class="tag">&lt;scope&gt;</span>test<span class="tag">&lt;/scope&gt;</span>
+<span class="tag">&lt;/dependency&gt;</span>
+
+<span class="tag">&lt;dependency&gt;</span>
+    <span class="tag">&lt;groupId&gt;</span>org.apache.openejb<span class="tag">&lt;/groupId&gt;</span>
+    <span class="tag">&lt;artifactId&gt;</span>openejb-core<span class="tag">&lt;/artifactId&gt;</span>
+    <span class="tag">&lt;version&gt;</span>${openejb.version}<span class="tag">&lt;/version&gt;</span>
+    <span class="tag">&lt;scope&gt;</span>test<span class="tag">&lt;/scope&gt;</span>
+<span class="tag">&lt;/dependency&gt;</span></code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_3_complete_additional_project_configuration">3. Complete Additional Project Configuration</h3>
+<div class="paragraph">
+<p>Add a <code>beans.xml</code> file in the project test module (e.g. src/test/resources/META-INF/beans.xml).</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_use_the_module_features">Use the Module Features</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_automated_container_booting_and_shutdown">Automated Container Booting and Shutdown</h3>
+<div class="sect3">
+<h4 id="_cditestrunner">CdiTestRunner</h4>
+<div class="paragraph">
+<p>Start and stop the CDI container automatically per test class with CdiTestRunner, a JUnit Test-Runner.
+This also starts and stops one request and session per test-method.</p>
+</div>
+<div class="listingblock">
+<div class="title">Example of CdiTestRunner Usage</div>
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@RunWith</span>(CdiTestRunner.class)
+<span class="directive">public</span> <span class="type">class</span> <span class="class">ContainerAndInjectionControl</span>
+{
+    <span class="annotation">@Inject</span>
+    <span class="directive">private</span> ApplicationScopedBean applicationScopedBean;
+
+    <span class="annotation">@Inject</span>
+    <span class="directive">private</span> SessionScopedBean sessionScopedBean;
+
+    <span class="annotation">@Inject</span>
+    <span class="directive">private</span> RequestScopedBean requestScopedBean;
+
+    <span class="comment">//test the injected beans</span>
+}</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_cditestsuiterunner">CdiTestSuiteRunner</h4>
+<div class="paragraph">
+<p>Extend automated CDI container start and stop actions to whole test suites with CdiTestSuiteRunner, a JUnit Test-Suite-Runner.</p>
+</div>
+<div class="listingblock">
+<div class="title">Example of CdiTestSuiteRunner Usage</div>
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@RunWith</span>(CdiTestSuiteRunner.class)
+<span class="annotation">@Suite</span>.SuiteClasses({
+    TestX.class,
+    TestY.class
+})
+<span class="directive">public</span> <span class="type">class</span> <span class="class">SuiteLevelContainerControl</span>
+{
+}</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_optional_shutdown_configuration">Optional Shutdown Configuration</h4>
+<div class="paragraph">
+<p>You can set <code>deltaspike.testcontrol.stop_container</code> to <code>false</code> (via the standard DeltaSpike config), resulting in the CDI Container being started just once for all tests.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_test_customization">Test Customization</h3>
+<div class="sect3">
+<h4 id="__testcontrol">@TestControl</h4>
+<div class="paragraph">
+<p>Customize the default behavior of CdiTestRunner with @TestControl. In the following
+case only one session for all test-methods (of the test-class) will be
+created.</p>
+</div>
+<div class="listingblock">
+<div class="title">Example of @TestControl Usage</div>
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@RunWith</span>(CdiTestRunner.class)
+<span class="annotation">@TestControl</span>(startScopes = SessionScoped.class)
+<span class="directive">public</span> <span class="type">class</span> <span class="class">CustomizedScopeHandling</span>
+{
+    <span class="comment">//inject beans and test them</span>
+}</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_projectstage_control">ProjectStage Control</h4>
+<div class="paragraph">
+<p>Override the default ProjectStage for unit tests with <code>ProjectStage.UnitTest.class</code>.</p>
+</div>
+<div class="listingblock">
+<div class="title">Example of projectStage Usage</div>
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@RunWith</span>(CdiTestRunner.class)
+<span class="annotation">@TestControl</span>(projectStage = CustomTestStage.class)
+<span class="directive">public</span> <span class="type">class</span> <span class="class">TestStageControl</span>
+{
+    <span class="comment">//tests here will see ProjectStage CustomTestStage.class</span>
+
+    <span class="annotation">@Test</span>
+    <span class="annotation">@TestControl</span>(projectStage = ProjectStage.Development.class)
+    <span class="directive">public</span> <span class="type">void</span> checkDevEnv()
+    {
+    }
+
+    <span class="comment">//tests here will see ProjectStage CustomTestStage.class</span>
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_optional_configuration">Optional Configuration</h3>
+<div class="paragraph">
+<p>From DeltaSpike 1.2, it is possible to provide a configuration for the underlying test-container.
+However, currently only the adapter for OpenEJB embedded (available in CDI-Control) supports it out-of-the-box.
+To pass properties to the underlying test-container,
+you have to add <code>/META-INF/apache-deltaspike_test-container.properties</code>
+to the resources-directory of your test-classpath.
+The content of the file are key/value pairs which get passed to the container.
+Therefore, it is a configuration which isis not used by DeltaSpike itself
+(it is just forwarded (as it is) to the underlying test-container).</p>
+</div>
+<div class="sect3">
+<h4 id="_reconfigure_the_config_file_name_or_location">Reconfigure the config-file Name or Location</h4>
+<div class="paragraph">
+<p>If you would like to point to an existing config-file, you have to add for example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="Properties">deltaspike.testcontrol.test-container.config-file=META-INF/existingConfig.properties</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>to <code>/META-INF/apache-deltaspike.properties</code>.</p>
+</div>
+<div class="paragraph">
+<p>If you would like to do it per ProjectStage, you can use for example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="Properties">deltaspike.testcontrol.test-container.config-file.UnitTest=META-INF/unit-test/existingConfig.properties</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_optional_integrations">Optional Integrations</h3>
+<div class="sect3">
+<h4 id="_mock_frameworks">Mock Frameworks</h4>
+<div class="paragraph">
+<p>From DeltaSpike 1.0, it is possible to mock CDI-Beans. Usually @Exclude (+
+ProjectStage) is enough, however, for some cases mocked beans might be
+easier. Therefore it is possible to create (mock-)instances manually or
+via a mocking framework and add them, for example, via <code>DynamicMockManager</code>.</p>
+</div>
+<div class="paragraph">
+<p><strong>Attention:</strong> Mocking CDI beans isis not supported for every feature of CDI and/or
+every implementation version. For example, we cais not mock intercepted CDI beans and
+with some implementations mocking specialized beans fails.
+Usually all features are active by default, however,
+due to those reasons we deactivated this feature by default.
+You can enable it by adding</p>
+</div>
+<div class="paragraph">
+<p><code>deltaspike.testcontrol.mock-support.allow_mocked_beans=true</code>
+and/or
+<code>deltaspike.testcontrol.mock-support.allow_mocked_producers=true</code></p>
+</div>
+<div class="paragraph">
+<p>to <code>/META-INF/apache-deltaspike.properties</code> in your test-folder.</p>
+</div>
+<div class="paragraph">
+<p>If you need dependency-injection in the mocked instances, you can use
+<code>BeanProvider.injectFields(myMockedBean);</code>.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@RunWith</span>(CdiTestRunner.class)
+<span class="directive">public</span> <span class="type">class</span> <span class="class">MockedRequestScopedBeanTest</span>
+{
+    <span class="annotation">@Inject</span>
+    <span class="directive">private</span> RequestScopedBean requestScopedBean;
+
+    <span class="annotation">@Inject</span>
+    <span class="directive">private</span> DynamicMockManager mockManager;
+
+    <span class="annotation">@Test</span>
+    <span class="directive">public</span> <span class="type">void</span> manualMock()
+    {
+        mockManager.addMock(<span class="keyword">new</span> RequestScopedBean() {
+            <span class="annotation">@Override</span>
+            <span class="directive">public</span> <span class="type">int</span> getCount()
+            {
+                <span class="keyword">return</span> <span class="integer">7</span>;
+            }
+        });
+
+        Assert.assertEquals(<span class="integer">7</span>, requestScopedBean.getCount());
+        requestScopedBean.increaseCount();
+        Assert.assertEquals(<span class="integer">7</span>, requestScopedBean.getCount());
+    }
+}
+
+<span class="annotation">@RequestScoped</span>
+<span class="directive">public</span> <span class="type">class</span> <span class="class">RequestScopedBean</span>
+{
+    <span class="directive">private</span> <span class="type">int</span> count = <span class="integer">0</span>;
+
+    <span class="directive">public</span> <span class="type">int</span> getCount()
+    {
+        <span class="keyword">return</span> count;
+    }
+
+    <span class="directive">public</span> <span class="type">void</span> increaseCount()
+    {
+        <span class="local-variable">this</span>.count++;
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Using a mocking framework makes no difference for adding the mock.</p>
+</div>
+<div class="listingblock">
+<div class="title">Example via Mockito</div>
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@RunWith</span>(CdiTestRunner.class)
+<span class="directive">public</span> <span class="type">class</span> <span class="class">MockitoMockedRequestScopedBeanTest</span>
+{
+    <span class="annotation">@Inject</span>
+    <span class="directive">private</span> RequestScopedBean requestScopedBean;
+
+    <span class="annotation">@Inject</span>
+    <span class="directive">private</span> DynamicMockManager mockManager;
+
+    <span class="annotation">@Test</span>
+    <span class="directive">public</span> <span class="type">void</span> mockitoMockAsCdiBean()
+    {
+        RequestScopedBean mockedRequestScopedBean = mock(RequestScopedBean.class);
+        when(mockedRequestScopedBean.getCount()).thenReturn(<span class="integer">7</span>);
+        mockManager.addMock(mockedRequestScopedBean);
+
+        Assert.assertEquals(<span class="integer">7</span>, requestScopedBean.getCount());
+        requestScopedBean.increaseCount();
+        Assert.assertEquals(<span class="integer">7</span>, requestScopedBean.getCount());
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Since CDI implementations like OpenWebBeans use a lot of optimizations,
+it is required to handle mocks for application-scoped beans differently, for example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@RunWith</span>(CdiTestRunner.class)
+<span class="directive">public</span> <span class="type">class</span> <span class="class">MockedApplicationScopedBeanTest</span>
+{
+    <span class="annotation">@Inject</span>
+    <span class="directive">private</span> ApplicationScopedBean applicationScopedBean;
+
+    <span class="annotation">@BeforeClass</span>
+    <span class="directive">public</span> <span class="directive">static</span> <span class="type">void</span> init()
+    {
+        ApplicationMockManager applicationMockManager = BeanProvider.getContextualReference(ApplicationMockManager.class);
+        applicationMockManager.addMock(<span class="keyword">new</span> MockedApplicationScopedBean());
+    }
+
+    <span class="annotation">@Test</span>
+    <span class="directive">public</span> <span class="type">void</span> manualMock()
+    {
+        Assert.assertEquals(<span class="integer">14</span>, applicationScopedBean.getCount());
+        applicationScopedBean.increaseCount();
+        Assert.assertEquals(<span class="integer">14</span>, applicationScopedBean.getCount());
+    }
+}
+
+<span class="annotation">@ApplicationScoped</span>
+<span class="directive">public</span> <span class="type">class</span> <span class="class">ApplicationScopedBean</span>
+{
+    <span class="directive">private</span> <span class="type">int</span> count = <span class="integer">0</span>;
+
+    <span class="directive">public</span> <span class="type">int</span> getCount()
+    {
+        <span class="keyword">return</span> count;
+    }
+
+    <span class="directive">public</span> <span class="type">void</span> increaseCount()
+    {
+        <span class="local-variable">this</span>.count++;
+    }
+}
+
+<span class="annotation">@Typed</span>() <span class="comment">//exclude it for the cdi type-check</span>
+<span class="directive">public</span> <span class="type">class</span> <span class="class">MockedApplicationScopedBean</span> <span class="directive">extends</span> ApplicationScopedBean
+{
+    <span class="annotation">@Override</span>
+    <span class="directive">public</span> <span class="type">int</span> getCount()
+    {
+        <span class="keyword">return</span> <span class="integer">14</span>;
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>However, <code>ApplicationMockManager</code> can be used for adding all mocks, if
+they should be active for the lifetime of the CDI-container.</p>
+</div>
+<div class="paragraph">
+<p>It is also possible to mock qualified beans. Just add the
+literal-instance(s) as additional parameter(s), for example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@RunWith</span>(CdiTestRunner.class)
+<span class="directive">public</span> <span class="type">class</span> <span class="class">MockedQualifiedBeanTest</span>
+{
+    <span class="annotation">@Inject</span>
+    <span class="annotation">@MyQualifier</span>
+    <span class="directive">private</span> QualifiedBean qualifiedBean;
+
+    <span class="annotation">@Inject</span>
+    <span class="directive">private</span> DynamicMockManager mockManager;
+
+    <span class="annotation">@Test</span>
+    <span class="directive">public</span> <span class="type">void</span> manualMockWithQualifier()
+    {
+        mockManager.addMock(<span class="keyword">new</span> QualifiedBean() {
+            <span class="annotation">@Override</span>
+            <span class="directive">public</span> <span class="type">int</span> getCount()
+            {
+                <span class="keyword">return</span> <span class="integer">21</span>;
+            }
+        }, AnnotationInstanceProvider.of(MyQualifier.class));
+
+        Assert.assertEquals(<span class="integer">21</span>, qualifiedBean.getCount());
+        qualifiedBean.increaseCount();
+        Assert.assertEquals(<span class="integer">21</span>, qualifiedBean.getCount());
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In some cases it is necessary to use <code>@javax.enterprise.inject.Typed</code>.
+Mocking such typed beans can result in an
+<code>AmbiguousResolutionException</code>. Therefore it is necessary to exclude the
+mocked implementation via <code>@Exclude</code> or <code>@Typed()</code> (or a parametrized
+constructor) and specify the target-type via <code>@TypedMock</code>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_jsf_via_myfaces_test">JSF (via MyFaces-Test)</h4>
+<div class="paragraph">
+<p>add on of</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>org.apache.deltaspike.testcontrol.impl.jsf.MockedJsf2TestContainer</p>
+</li>
+<li>
+<p>org.apache.deltaspike.testcontrol.impl.jsf.MockedJsfTestContainerAdapter</p>
+</li>
+<li>
+<p>org.apache.deltaspike.testcontrol.impl.jsf.MyFacesContainerAdapter</p>
+</li>
+<li>
+<p>org.apache.deltaspike.testcontrol.impl.jsf.MyFacesContainerPerTestMethodAdapter</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>as content to</p>
+</div>
+<div class="paragraph">
+<p>/META-INF/services/org.apache.deltaspike.testcontrol.spi.ExternalContainer</p>
+</div>
+<div class="paragraph">
+<p>(in your config-folder for tests, e.g. test/resources)</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_mixed_tests">Mixed Tests</h3>
+<div class="paragraph">
+<p>Usually you should have one kind of tests per test-module. However, if
+you need to add, for example, a test without an external-container to your
+test-module which uses external-containers, you can annotate your test
+with:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@RunWith</span>(CdiTestRunner.class)
+<span class="annotation">@TestControl</span>(startExternalContainers = <span class="predefined-constant">false</span>)
+<span class="directive">public</span> <span class="type">class</span> <span class="class">JsfContainerTest</span>
+{
+    <span class="comment">//...</span>
+}</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_known_restrictions">Known Restrictions</h3>
+<div class="sect3">
+<h4 id="_liquibase">Liquibase</h4>
+<div class="paragraph">
+<p>Liquibase invokes <code>#toString</code> in a <code>AfterDeploymentValidation</code> observer.
+<strong>that isis not portable</strong> and therefore you have to deactivate the
+mocking-support via:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">class</span> <span class="class">LiquibaseAwareClassDeactivator</span> <span class="directive">implements</span> ClassDeactivator {
+    <span class="annotation">@Override</span>
+    <span class="directive">public</span> <span class="predefined-type">Boolean</span> isActivated(<span class="predefined-type">Class</span>&lt;? <span class="directive">extends</span> Deactivatable&gt; targetClass) {
+        <span class="keyword">return</span> !<span class="string"><span class="delimiter">&quot;</span><span class="content">org.apache.deltaspike.testcontrol.impl.mock.MockExtension</span><span class="delimiter">&quot;</span></span>.equals(targetClass.getName());
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>and add <code>LiquibaseAwareClassDeactivator</code> to <code>/META-INF/apache-deltaspike.properties</code>, for example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>org.apache.deltaspike.core.spi.activation.ClassDeactivator=myPackage.LiquibaseAwareClassDeactivator</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Further details are available at deactivatable.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_spi">SPI</h3>
+<div class="sect3">
+<h4 id="_externalcontainer">ExternalContainer</h4>
+<div class="paragraph">
+<p>org.apache.deltaspike.testcontrol.spi.ExternalContainer allows to
+integrate containers which get started after the CDI container.
+Currently DeltaSpike provides:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>MockedJsf2TestContainer (integration with MyFaces-Test)</p>
+</li>
+</ul>
+</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