deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r864998 [1/15] - in /websites/staging/deltaspike/trunk/content: ./ deltaspike/ deltaspike/draft/ deltaspike/resources/ draft/ resources/ resources/css/ resources/files/ resources/images/ resources/js/
Date Sun, 09 Jun 2013 09:26:33 GMT
Author: buildbot
Date: Sun Jun  9 09:26:31 2013
New Revision: 864998

Log:
Staging update by buildbot for deltaspike

Added:
    websites/staging/deltaspike/trunk/content/I18n.html
    websites/staging/deltaspike/trunk/content/_features.html
    websites/staging/deltaspike/trunk/content/_modules.html
    websites/staging/deltaspike/trunk/content/build.html
    websites/staging/deltaspike/trunk/content/community.html
    websites/staging/deltaspike/trunk/content/container-control.html
    websites/staging/deltaspike/trunk/content/contributors.html
    websites/staging/deltaspike/trunk/content/core.html
    websites/staging/deltaspike/trunk/content/documentation.html
    websites/staging/deltaspike/trunk/content/download.html
    websites/staging/deltaspike/trunk/content/draft/
    websites/staging/deltaspike/trunk/content/draft/backlog.html
    websites/staging/deltaspike/trunk/content/draft/cdi-1.1-proposals.html
    websites/staging/deltaspike/trunk/content/draft/drafts.html
    websites/staging/deltaspike/trunk/content/draft/exception_draft.html
    websites/staging/deltaspike/trunk/content/draft/index2.html
    websites/staging/deltaspike/trunk/content/draft/se-features-ranking.html
    websites/staging/deltaspike/trunk/content/examples.html
    websites/staging/deltaspike/trunk/content/exceptions.html
    websites/staging/deltaspike/trunk/content/index.html
    websites/staging/deltaspike/trunk/content/jpa.html
    websites/staging/deltaspike/trunk/content/jsf.html
    websites/staging/deltaspike/trunk/content/migration-guide.html
    websites/staging/deltaspike/trunk/content/new-committer.html
    websites/staging/deltaspike/trunk/content/news.html
    websites/staging/deltaspike/trunk/content/project-name.html
    websites/staging/deltaspike/trunk/content/release-preparation.html
    websites/staging/deltaspike/trunk/content/resources/
    websites/staging/deltaspike/trunk/content/resources/css/
    websites/staging/deltaspike/trunk/content/resources/css/bootstrap-responsive.css
    websites/staging/deltaspike/trunk/content/resources/css/bootstrap.css
    websites/staging/deltaspike/trunk/content/resources/css/codehilite.css
    websites/staging/deltaspike/trunk/content/resources/css/contributors.css
    websites/staging/deltaspike/trunk/content/resources/css/prettify.css
    websites/staging/deltaspike/trunk/content/resources/files/
    websites/staging/deltaspike/trunk/content/resources/files/deltaspike-code-conventions.xml   (with props)
    websites/staging/deltaspike/trunk/content/resources/files/settings.jar   (with props)
    websites/staging/deltaspike/trunk/content/resources/images/
    websites/staging/deltaspike/trunk/content/resources/images/delta-symbol-spike-white-greek-medium.png   (with props)
    websites/staging/deltaspike/trunk/content/resources/images/delta-symbol-spike.png   (with props)
    websites/staging/deltaspike/trunk/content/resources/images/deltaspike-3words.png   (with props)
    websites/staging/deltaspike/trunk/content/resources/images/deltaspike-logo-medium.png   (with props)
    websites/staging/deltaspike/trunk/content/resources/images/deltaspike-logo.png   (with props)
    websites/staging/deltaspike/trunk/content/resources/images/ds-logo.png   (with props)
    websites/staging/deltaspike/trunk/content/resources/js/
    websites/staging/deltaspike/trunk/content/resources/js/bootstrap-alert.js
    websites/staging/deltaspike/trunk/content/resources/js/bootstrap-button.js
    websites/staging/deltaspike/trunk/content/resources/js/bootstrap-carousel.js
    websites/staging/deltaspike/trunk/content/resources/js/bootstrap-collapse.js
    websites/staging/deltaspike/trunk/content/resources/js/bootstrap-dropdown.js
    websites/staging/deltaspike/trunk/content/resources/js/bootstrap-modal.js
    websites/staging/deltaspike/trunk/content/resources/js/bootstrap-popover.js
    websites/staging/deltaspike/trunk/content/resources/js/bootstrap-scrollspy.js
    websites/staging/deltaspike/trunk/content/resources/js/bootstrap-tab.js
    websites/staging/deltaspike/trunk/content/resources/js/bootstrap-tooltip.js
    websites/staging/deltaspike/trunk/content/resources/js/bootstrap-transition.js
    websites/staging/deltaspike/trunk/content/resources/js/bootstrap-typeahead.js
    websites/staging/deltaspike/trunk/content/resources/js/jquery.js
    websites/staging/deltaspike/trunk/content/resources/js/prettify.js
    websites/staging/deltaspike/trunk/content/resources/js/prettyprint.js
    websites/staging/deltaspike/trunk/content/security.html
    websites/staging/deltaspike/trunk/content/source.html
    websites/staging/deltaspike/trunk/content/spi.html
    websites/staging/deltaspike/trunk/content/suggested-git-workflows.html
    websites/staging/deltaspike/trunk/content/support.html
    websites/staging/deltaspike/trunk/content/supporters.html
Removed:
    websites/staging/deltaspike/trunk/content/deltaspike/I18n.html
    websites/staging/deltaspike/trunk/content/deltaspike/_features.html
    websites/staging/deltaspike/trunk/content/deltaspike/_modules.html
    websites/staging/deltaspike/trunk/content/deltaspike/build.html
    websites/staging/deltaspike/trunk/content/deltaspike/community.html
    websites/staging/deltaspike/trunk/content/deltaspike/container-control.html
    websites/staging/deltaspike/trunk/content/deltaspike/contributors.html
    websites/staging/deltaspike/trunk/content/deltaspike/core.html
    websites/staging/deltaspike/trunk/content/deltaspike/documentation.html
    websites/staging/deltaspike/trunk/content/deltaspike/download.html
    websites/staging/deltaspike/trunk/content/deltaspike/draft/
    websites/staging/deltaspike/trunk/content/deltaspike/examples.html
    websites/staging/deltaspike/trunk/content/deltaspike/exceptions.html
    websites/staging/deltaspike/trunk/content/deltaspike/index.html
    websites/staging/deltaspike/trunk/content/deltaspike/jpa.html
    websites/staging/deltaspike/trunk/content/deltaspike/jsf.html
    websites/staging/deltaspike/trunk/content/deltaspike/migration-guide.html
    websites/staging/deltaspike/trunk/content/deltaspike/new-committer.html
    websites/staging/deltaspike/trunk/content/deltaspike/news.html
    websites/staging/deltaspike/trunk/content/deltaspike/project-name.html
    websites/staging/deltaspike/trunk/content/deltaspike/release-preparation.html
    websites/staging/deltaspike/trunk/content/deltaspike/resources/
    websites/staging/deltaspike/trunk/content/deltaspike/security.html
    websites/staging/deltaspike/trunk/content/deltaspike/source.html
    websites/staging/deltaspike/trunk/content/deltaspike/spi.html
    websites/staging/deltaspike/trunk/content/deltaspike/suggested-git-workflows.html
    websites/staging/deltaspike/trunk/content/deltaspike/support.html
    websites/staging/deltaspike/trunk/content/deltaspike/supporters.html
Modified:
    websites/staging/deltaspike/trunk/content/   (props changed)

Propchange: websites/staging/deltaspike/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sun Jun  9 09:26:31 2013
@@ -1 +1 @@
-1489631
+1491164

Added: websites/staging/deltaspike/trunk/content/I18n.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/I18n.html (added)
+++ websites/staging/deltaspike/trunk/content/I18n.html Sun Jun  9 09:26:31 2013
@@ -0,0 +1,208 @@
+<!DOCTYPE html>
+<html lang="en">
+<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>Apache DeltaSpike - I18n</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="./deltaspike/resources/css/bootstrap.css" rel="stylesheet">    
+    <!--<link href="./deltaspike/resources/css/prettify.css" rel="stylesheet" /> -->
+    <link href="./deltaspike/resources/css/codehilite.css" rel="stylesheet" />
+    <link href="./deltaspike/resources/css/bootstrap-responsive.css" rel="stylesheet">
+    <style type="text/css">
+        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" href="index.html"><img src="./deltaspike/resources/images/deltaspike-logo-medium.png"/></a>
+                <div class="nav-collapse">
+                    <ul class="nav">
+                        <li class="active"><a href="./deltaspike/index.html">Home</a></li>
+                        <li><a href="./deltaspike/documentation.html">Documentation</a></li>
+                        <li><a href="./deltaspike/source.html">Source</a></li>
+                        <!-- <li><a href="./deltaspike/download.html">Download</a></li> -->
+                        <li><a href="./deltaspike/community.html">Community</a></li>
+                        <!-- <li><a href="./deltaspike/support.html">Support</a></li>  -->
+                        <li><a href="./deltaspike/news.html">News</a></li>
+                        <li><a href="./deltaspike/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="incubator.apache.org/deltaspike" 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>I18n</h1>
+              </div>
+              <h2 id="type-safe-messages">Type-safe messages</h2>
+<h3 id="simple-use-case">Simple use-case</h3>
+<p>The following implementation is the minimal effort to use type-safe messages (which are hardcoded in this case).</p>
+<p><strong>Simple type-safe message</strong></p>
+<div class="codehilite"><pre><span class="p">@</span><span class="n">MessageBundle</span>
+<span class="n">public</span> <span class="n">interface</span> <span class="n">SimpleMessage</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">MessageTemplate</span><span class="p">(</span>&quot;<span class="n">Welcome</span> <span class="n">to</span> <span class="n">DeltaSpike</span>&quot;<span class="p">)</span>
+    <span class="n">String</span> <span class="n">welcomeToDeltaSpike</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>The following implementation uses the key <code>welcome_to_deltaspike</code> to do a lookup in the default message bundle. The default bundle has the same name as the interface (but .properties instead of .java (/.class) as file extension).</p>
+<p><strong>Internationalized type-safe message</strong></p>
+<div class="codehilite"><pre><span class="p">@</span><span class="n">MessageBundle</span>
+<span class="n">public</span> <span class="n">interface</span> <span class="n">SimpleMessage</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">MessageTemplate</span><span class="p">(</span>&quot;<span class="p">{</span><span class="n">welcome_to_deltaspike</span><span class="p">}</span>&quot;<span class="p">)</span>
+    <span class="n">String</span> <span class="n">welcomeToDeltaSpike</span><span class="p">();</span>
+<span class="p">}</span>
+
+<span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">deltaspike</span><span class="p">.</span><span class="n">example</span><span class="p">.</span><span class="n">message</span><span class="p">.</span><span class="n">SimpleMessage</span>
+
+<span class="o">-&gt;</span>
+
+<span class="n">org</span><span class="o">/</span><span class="n">apache</span><span class="o">/</span><span class="n">deltaspike</span><span class="o">/</span><span class="n">example</span><span class="o">/</span><span class="n">message</span><span class="o">/</span><span class="n">SimpleMessage</span><span class="p">.</span><span class="k">properties</span>
+<span class="n">org</span><span class="o">/</span><span class="n">apache</span><span class="o">/</span><span class="n">deltaspike</span><span class="o">/</span><span class="n">example</span><span class="o">/</span><span class="n">message</span><span class="o">/</span><span class="n">SimpleMessage_en</span><span class="p">.</span><span class="k">properties</span>
+<span class="n">org</span><span class="o">/</span><span class="n">apache</span><span class="o">/</span><span class="n">deltaspike</span><span class="o">/</span><span class="n">example</span><span class="o">/</span><span class="n">message</span><span class="o">/</span><span class="n">SimpleMessage_de</span><span class="p">.</span><span class="k">properties</span>
+<span class="p">...</span>
+
+<span class="o">//</span><span class="n">content</span> <span class="p">(</span><span class="n">as</span> <span class="n">usual</span> <span class="n">in</span> <span class="n">message</span> <span class="n">bundle</span> <span class="n">files</span><span class="p">:</span>
+<span class="n">welcome_to_deltaspike</span><span class="p">=</span><span class="n">Welcome</span> <span class="n">to</span> <span class="n">DeltaSpike</span>
+</pre></div>
+
+
+<p>The following implementation uses the key <code>welcome_to_deltaspike</code> to do a lookup in a custom message bundle known by <code>CustomMessageResolver</code>.</p>
+<p><strong>Internationalized type-safe message</strong></p>
+<div class="codehilite"><pre><span class="p">@</span><span class="n">MessageBundle</span>
+<span class="p">@</span><span class="n">MessageContextConfig</span><span class="p">(</span><span class="n">messageResolver</span> <span class="p">=</span> <span class="n">CustomMessageResolver</span><span class="p">.</span><span class="n">class</span><span class="p">)</span>
+<span class="n">public</span> <span class="n">interface</span> <span class="n">SimpleMessage</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">MessageTemplate</span><span class="p">(</span>&quot;<span class="p">{</span><span class="n">welcome_to_deltaspike</span><span class="p">}</span>&quot;<span class="p">)</span>
+    <span class="n">String</span> <span class="n">welcomeToDeltaSpike</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p><code>@MessageContextConfig</code> allows to provide a custom <code>MessageResolver</code>, <code>MessageInterpolator</code> and <code>LocaleResolver</code>.</p>
+<p>The following implementation shows the usage of an internationalized simple type-safe message.</p>
+<p><strong>Internationalized type-safe message with parameter/s</strong></p>
+<div class="codehilite"><pre><span class="p">@</span><span class="n">MessageBundle</span>
+<span class="p">@</span><span class="n">MessageContextConfig</span><span class="p">(</span><span class="n">messageInterpolator</span> <span class="p">=</span> <span class="n">CustomMessageInterpolator</span><span class="p">.</span><span class="n">class</span><span class="p">)</span>
+<span class="n">public</span> <span class="n">interface</span> <span class="n">SimpleMessage</span>
+<span class="p">{</span>
+    <span class="o">//</span><span class="n">in</span> <span class="n">the</span> <span class="n">message</span> <span class="n">bundle</span><span class="p">:</span> <span class="n">welcome_to</span><span class="p">=</span><span class="n">Welcome</span> <span class="n">to</span> <span class="c">%s</span>
+
+    <span class="p">@</span><span class="n">MessageTemplate</span><span class="p">(</span>&quot;<span class="p">{</span><span class="n">welcome_to</span><span class="p">}</span>&quot;<span class="p">)</span>
+    <span class="n">String</span> <span class="n">welcomeTo</span><span class="p">(</span><span class="n">String</span> <span class="n">name</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="o">//</span><span class="p">...</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">MyBean</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">Inject</span>
+    <span class="n">private</span> <span class="n">SimpleMessage</span> <span class="n">messages</span><span class="p">;</span>
+
+    <span class="n">public</span> <span class="n">String</span> <span class="n">welcomeToDeltaSpike</span>
+    <span class="p">{</span>
+        <span class="k">return</span> <span class="n">this</span><span class="p">.</span><span class="n">messages</span><span class="p">.</span><span class="n">welcomeTo</span><span class="p">(</span>&quot;<span class="n">DeltaSpike</span>&quot;<span class="p">);</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<h2 id="dynamic-message-builder">Dynamic Message Builder</h2>
+<h3 id="creating-message-instances">Creating message instances</h3>
+<p>The following implementation creates an instance of <code>Message</code> for the key <code>hello</code>. The final text will be resolved and interpolated lazily. Later on it might be supported to provide a different <code>MessageContext</code> via <code>#toString(MessageContext)</code> like it is in MyFaces CODI right now.</p>
+<p>[TODO]</p>
+<h3 id="customizing-the-message-context">Customizing the message context</h3>
+<h4 id="messageresolver">MessageResolver</h4>
+<p>A message-resolver is responsible for creating the message-text based on the message-descriptor (key or inline-text), the current locale (and in some cases the message-payload).
+(The supported format e.g. if it's required to escape a key, if inline-text is supported,... depends on the concrete implementation.)
+In case of a message-key, the message-resolver has to transform it to the message-text by looking it up in a message source like a resource-bundle.</p>
+<p><strong>Configuration of a message-resolver</strong></p>
+<p>[TODO]</p>
+<p>The result of a <code>MessageResolver</code> is the message-text. The text might contain placeholders which are processed by a <code>MessageInterpolator</code></p>
+<h4 id="messageinterpolator">MessageInterpolator</h4>
+<p>A <code>MessageInterpolator</code> replaces the placeholders in a message-text with the arguments of the message.</p>
+<p><strong>Configuration of a message-interpolator</strong></p>
+<p>[TODO]</p>
+<h4 id="localeresolver">LocaleResolver</h4>
+<p>A locale resolver provides the current locale. The locale is e.g. used to by a <code>MessageResolver</code> to choose the correct language for the message-text.</p>
+<p><strong>Configuration of a locale-resolver</strong></p>
+<p>[TODO]</p>
+          </div>
+      </div>
+
+      <hr>
+
+      <footer>
+        <p>Copyright © 20011-2012 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 -->
+
+    <!-- Javascript
+    ================================================== -->
+    <!-- Placed at the end of the document so the pages load faster -->
+    <!--<script src="./deltaspike/resources/js/prettyfy.js"></script> -->
+    <script src="./deltaspike/resources/js/prettyprint.js"></script>
+    <script src="./deltaspike/resources/js/jquery.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-transition.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-alert.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-modal.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-dropdown.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-scrollspy.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-tab.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-tooltip.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-popover.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-button.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-collapse.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-carousel.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-typeahead.js"></script>
+
+</body>
+</html>
\ No newline at end of file

Added: websites/staging/deltaspike/trunk/content/_features.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/_features.html (added)
+++ websites/staging/deltaspike/trunk/content/_features.html Sun Jun  9 09:26:31 2013
@@ -0,0 +1,188 @@
+<!DOCTYPE html>
+<html lang="en">
+<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>Apache DeltaSpike - Feature Overview</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="./deltaspike/resources/css/bootstrap.css" rel="stylesheet">    
+    <!--<link href="./deltaspike/resources/css/prettify.css" rel="stylesheet" /> -->
+    <link href="./deltaspike/resources/css/codehilite.css" rel="stylesheet" />
+    <link href="./deltaspike/resources/css/bootstrap-responsive.css" rel="stylesheet">
+    <style type="text/css">
+        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" href="index.html"><img src="./deltaspike/resources/images/deltaspike-logo-medium.png"/></a>
+                <div class="nav-collapse">
+                    <ul class="nav">
+                        <li class="active"><a href="./deltaspike/index.html">Home</a></li>
+                        <li><a href="./deltaspike/documentation.html">Documentation</a></li>
+                        <li><a href="./deltaspike/source.html">Source</a></li>
+                        <!-- <li><a href="./deltaspike/download.html">Download</a></li> -->
+                        <li><a href="./deltaspike/community.html">Community</a></li>
+                        <!-- <li><a href="./deltaspike/support.html">Support</a></li>  -->
+                        <li><a href="./deltaspike/news.html">News</a></li>
+                        <li><a href="./deltaspike/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="incubator.apache.org/deltaspike" 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>Feature Overview</h1>
+              </div>
+              <h2 id="annotated-type-builder">Annotated Type Builder</h2>
+<p>DeltaSpike provides an {{AnnotatedType}} implementation (and corresponding implementations of the suite of Annotated interfaces from CDI) that should be suitable for the needs of most portable extensions. The {{AnnotatedType}} is created from {{AnnotatedTypeBuilder}}, typically in an extension's observer method, as follows:</p>
+<div class="codehilite"><pre><span class="nx">Modifying</span> <span class="nx">an</span> <span class="nx">AnnotatedType</span>
+<span class="kr">public</span> <span class="kr">class</span> <span class="nx">NamingConventionAwareMetadataFilter</span> <span class="kr">implements</span> <span class="nx">Extension</span>
+<span class="p">{</span>
+    <span class="kr">public</span> <span class="k">void</span> <span class="nx">ensureNamingConvention</span><span class="p">(</span><span class="err">@</span><span class="nx">Observes</span> <span class="nx">ProcessAnnotatedType</span> <span class="nx">processAnnotatedType</span><span class="p">)</span>
+    <span class="p">{</span>
+        <span class="nx">Class</span><span class="cp">&lt;?</span><span class="o">&gt;</span> <span class="nx">beanClass</span> <span class="o">=</span> <span class="nx">processAnnotatedType</span><span class="o">.</span><span class="nx">getAnnotatedType</span><span class="p">()</span><span class="o">.</span><span class="nx">getJavaClass</span><span class="p">();</span>
+
+        <span class="nx">Named</span> <span class="nx">namedAnnotation</span> <span class="o">=</span> <span class="nx">beanClass</span><span class="o">.</span><span class="nx">getAnnotation</span><span class="p">(</span><span class="nx">Named</span><span class="o">.</span><span class="nx">class</span><span class="p">);</span>
+        <span class="k">if</span><span class="p">(</span><span class="nx">namedAnnotation</span> <span class="o">!=</span> <span class="k">null</span> <span class="o">&amp;&amp;</span>
+                <span class="nx">namedAnnotation</span><span class="o">.</span><span class="nx">value</span><span class="p">()</span><span class="o">.</span><span class="nx">length</span><span class="p">()</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="o">&amp;&amp;</span>
+                <span class="nx">Character</span><span class="o">.</span><span class="nx">isUpperCase</span><span class="p">(</span><span class="nx">namedAnnotation</span><span class="o">.</span><span class="nx">value</span><span class="p">()</span><span class="o">.</span><span class="nx">charAt</span><span class="p">(</span><span class="mi">0</span><span class="p">)))</span>
+        <span class="p">{</span>
+            <span class="nx">AnnotatedTypeBuilder</span> <span class="nx">builder</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">AnnotatedTypeBuilder</span><span class="p">();</span>
+            <span class="nx">builder</span><span class="o">.</span><span class="nx">readFromType</span><span class="p">(</span><span class="nx">beanClass</span><span class="p">);</span>
+
+            <span class="nx">String</span> <span class="nx">beanName</span> <span class="o">=</span> <span class="nx">namedAnnotation</span><span class="o">.</span><span class="nx">value</span><span class="p">();</span>
+            <span class="nx">String</span> <span class="nx">newBeanName</span> <span class="o">=</span> <span class="nx">beanName</span><span class="o">.</span><span class="nx">substring</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="nx">toLowerCase</span><span class="p">()</span> <span class="o">+</span> <span class="nx">beanName</span><span class="o">.</span><span class="nx">substring</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+
+            <span class="nx">builder</span><span class="o">.</span><span class="nx">removeFromClass</span><span class="p">(</span><span class="nx">Named</span><span class="o">.</span><span class="nx">class</span><span class="p">)</span>
+                   <span class="o">.</span><span class="nx">addToClass</span><span class="p">(</span><span class="k">new</span> <span class="nx">NamedLiteral</span><span class="p">(</span><span class="nx">newBeanName</span><span class="p">));</span>
+
+            <span class="nx">processAnnotatedType</span><span class="o">.</span><span class="nx">setAnnotatedType</span><span class="p">(</span><span class="nx">builder</span><span class="o">.</span><span class="nx">create</span><span class="p">());</span>
+        <span class="p">}</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+<span class="c1">//don&#39;t forget to configure the extension in /META-INF/services/javax.enterprise.inject.spi.Extension</span>
+</pre></div>
+
+
+<p>In the example above we create a new builder, and initialize it using an existing {{AnnotatedType}}. We can then add or remove annotations from the class, and its members. When we have finished modifying the type, we call {{#create()}} to spit out a new, immutable, {{AnnotatedType}}. In the example {{@Named}} gets replaced if the bean-name doesn't start with a lower case character. {{NamedLiteral}} takes the new value which should be used for the new instance of {{@Named}}. That means if a class is annotated e.g. with {{@Named("MyBean")}} it will be replaced with {{@Named("myBean")}} during the bootstrapping process.</p>
+<p>AnnotatedTypeBuilder provides the following methods:
+  * addToClass
+  * addToConstructor
+  * addToConstructorParameter
+  * addToField
+  * addToMethod
+  * addToMethodParameter
+  * addToParameter
+  * overrideConstructorParameterType
+  * overrideFieldType
+  * overrideMethodParameterType
+  * overrideParameterType
+  * readFromType
+  * removeFromAll
+  * removeFromClass
+  * removeFromConstructor
+  * removeFromConstructorParameter
+  * removeFromField
+  * removeFromMethod
+  * removeFromMethodParameter
+  * removeFromParameter
+  * getJavaClass
+  * setJavaClass
+  * create</p>
+<h2 id="annotationinstanceprovider">AnnotationInstanceProvider</h2>
+<p>DeltaSpike has the ability, with the AnnotationInstanceProvider class, to dynamically create instances of annotations. These are useful for adding annotations to bean metadata in extensions, adding qualifiers to events, etc. Usage is very simple and straight forward. There are two public methods: {{of(Class<T extends Annotation>)}} and {{of(Class<T extends Annotation>, Map<String, ?>)}}. The first is simply a short cut passing an empty map to the second. The map parameter is a map of values to be used for the members of the annotation. The keys in the map must be the names of members in the annotation (i.e. value, type, etc.). Simple usages are below.</p>
+<div class="codehilite"><pre><span class="n">No</span> <span class="n">Member</span> <span class="n">values</span>
+<span class="n">RequestScoped</span> <span class="n">requestScopedInstance</span> <span class="p">=</span> <span class="n">AnnotationInstanceProvider</span><span class="p">.</span><span class="n">of</span><span class="p">(</span><span class="n">RequestScoped</span><span class="p">.</span><span class="n">class</span><span class="p">);</span>
+
+<span class="n">Multiple</span> <span class="n">member</span> <span class="n">values</span>
+<span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span> <span class="n">Object</span><span class="o">&gt;</span> <span class="n">memberValues</span> <span class="p">=</span> <span class="n">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span> <span class="n">Object</span><span class="o">&gt;</span><span class="p">();</span>
+<span class="n">memberValues</span><span class="p">.</span><span class="n">put</span><span class="p">(</span>&quot;<span class="n">booleanValue</span>&quot;<span class="p">,</span> <span class="n">false</span><span class="p">);</span>
+<span class="n">memberValues</span><span class="p">.</span><span class="n">put</span><span class="p">(</span>&quot;<span class="n">booleanValues</span>&quot;<span class="p">,</span> <span class="n">new</span> <span class="n">boolean</span><span class="p">[]{</span><span class="n">false</span><span class="p">});</span>
+<span class="n">memberValues</span><span class="p">.</span><span class="n">put</span><span class="p">(</span>&quot;<span class="n">byteValue</span>&quot;<span class="p">,</span> <span class="p">(</span><span class="n">byte</span><span class="p">)</span> 0<span class="p">);</span>
+<span class="n">memberValues</span><span class="p">.</span><span class="n">put</span><span class="p">(</span>&quot;<span class="n">byteValues</span>&quot;<span class="p">,</span> <span class="n">new</span> <span class="n">byte</span><span class="p">[]{(</span><span class="n">byte</span><span class="p">)</span> 0<span class="p">});</span>
+<span class="n">memberValues</span><span class="p">.</span><span class="n">put</span><span class="p">(</span>&quot;<span class="n">type</span>&quot;<span class="p">,</span> <span class="n">Object</span><span class="p">.</span><span class="n">class</span><span class="p">);</span>
+<span class="n">memberValues</span><span class="p">.</span><span class="n">put</span><span class="p">(</span>&quot;<span class="n">types</span>&quot;<span class="p">,</span> <span class="n">new</span> <span class="n">Class</span><span class="p">[]{</span><span class="n">Object</span><span class="p">.</span><span class="n">class</span><span class="p">});</span>
+
+<span class="n">TestAnnotation</span> <span class="n">testAnnotation</span> <span class="p">=</span> <span class="n">AnnotationInstanceProvider</span><span class="p">.</span><span class="n">of</span><span class="p">(</span><span class="n">TestAnnotation</span><span class="p">.</span><span class="n">class</span><span class="p">,</span> <span class="n">memberValues</span><span class="p">);</span>
+</pre></div>
+
+
+<p>AnnotationInstanceProvider provides an implementation of equals, hashCode and toString compliant with the javadocs for Annotation. It also caches the instances for the duration of the application. Creating a new instance of the same class and same member values will yield the same instance as before.</p>
+          </div>
+      </div>
+
+      <hr>
+
+      <footer>
+        <p>Copyright © 20011-2012 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 -->
+
+    <!-- Javascript
+    ================================================== -->
+    <!-- Placed at the end of the document so the pages load faster -->
+    <!--<script src="./deltaspike/resources/js/prettyfy.js"></script> -->
+    <script src="./deltaspike/resources/js/prettyprint.js"></script>
+    <script src="./deltaspike/resources/js/jquery.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-transition.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-alert.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-modal.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-dropdown.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-scrollspy.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-tab.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-tooltip.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-popover.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-button.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-collapse.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-carousel.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-typeahead.js"></script>
+
+</body>
+</html>
\ No newline at end of file

Added: websites/staging/deltaspike/trunk/content/_modules.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/_modules.html (added)
+++ websites/staging/deltaspike/trunk/content/_modules.html Sun Jun  9 09:26:31 2013
@@ -0,0 +1,583 @@
+<!DOCTYPE html>
+<html lang="en">
+<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>Apache DeltaSpike - Modules</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="./deltaspike/resources/css/bootstrap.css" rel="stylesheet">    
+    <!--<link href="./deltaspike/resources/css/prettify.css" rel="stylesheet" /> -->
+    <link href="./deltaspike/resources/css/codehilite.css" rel="stylesheet" />
+    <link href="./deltaspike/resources/css/bootstrap-responsive.css" rel="stylesheet">
+    <style type="text/css">
+        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" href="index.html"><img src="./deltaspike/resources/images/deltaspike-logo-medium.png"/></a>
+                <div class="nav-collapse">
+                    <ul class="nav">
+                        <li class="active"><a href="./deltaspike/index.html">Home</a></li>
+                        <li><a href="./deltaspike/documentation.html">Documentation</a></li>
+                        <li><a href="./deltaspike/source.html">Source</a></li>
+                        <!-- <li><a href="./deltaspike/download.html">Download</a></li> -->
+                        <li><a href="./deltaspike/community.html">Community</a></li>
+                        <!-- <li><a href="./deltaspike/support.html">Support</a></li>  -->
+                        <li><a href="./deltaspike/news.html">News</a></li>
+                        <li><a href="./deltaspike/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="incubator.apache.org/deltaspike" 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>Modules</h1>
+              </div>
+              <div class="toc">
+<ul>
+<li><a href="#security">Security</a><ul>
+<li><a href="#securitybinding-for-class-and-method-invocations">SecurityBinding for class and method invocations</a></li>
+<li><a href="#integrating-3rd-party-security-frameworks">Integrating 3rd party security frameworks</a><ul>
+<li><a href="#secured">@Secured</a></li>
+<li><a href="#accessdecisionvoter">AccessDecisionVoter</a></li>
+<li><a href="#securityviolation">SecurityViolation</a></li>
+<li><a href="#secured-and-stereotypes-with-custom-meta-data">@Secured and Stereotypes with custom Meta-data</a></li>
+</ul>
+</li>
+<li><a href="#accessdecisionvotercontext">AccessDecisionVoterContext</a></li>
+<li><a href="#securitystrategy-spi">SecurityStrategy SPI</a></li>
+</ul>
+</li>
+<li><a href="#jpa">JPA</a><ul>
+<li><a href="#transactional">@Transactional</a></li>
+<li><a href="#transactionscoped">@TransactionScoped</a></li>
+</ul>
+</li>
+</ul>
+</div>
+<hr />
+<h1 id="security">Security</h1>
+<h2 id="securitybinding-for-class-and-method-invocations">SecurityBinding for class and method invocations</h2>
+<p>This feature of the security module functions by intercepting method calls, and performing a security check before invocation is allowed to proceed.</p>
+<p>In order to use the DeltaSpike security module, you must first have installed the proper dependencies into your POM file. Once this is complete, you may proceed to create a security parameter binding annotation. This is what we will use to add security behavior to our business classes and methods.</p>
+<div class="codehilite"><pre><span class="n">Create</span> <span class="n">the</span> <span class="n">SecurityBinding</span>
+<span class="err">@</span><span class="n">Retention</span><span class="p">(</span><span class="n">value</span> <span class="o">=</span> <span class="n">RUNTIME</span><span class="p">)</span>
+<span class="err">@</span><span class="n">Target</span><span class="p">({</span><span class="n">TYPE</span><span class="p">,</span> <span class="n">METHOD</span><span class="p">})</span>
+<span class="err">@</span><span class="n">Documented</span>
+<span class="err">@</span><span class="n">SecurityBindingType</span>
+<span class="n">public</span> <span class="err">@</span><span class="n">interface</span> <span class="n">CustomSecurityBinding</span> <span class="p">{</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>Next, we must define an Authorizer class to implement behavior for our custom SecurityBindingType. This class is simply a CDI bean which declares a @Secures method, qualified with the security binding annotation we created in the first step.</p>
+<p>This method has access to the InvocationContext of the method call, so if we need to access parameter arguments, we can do so using the given context. Note that we may also inject other beans into the parameter list of our @Secures method.</p>
+<div class="codehilite"><pre><span class="n">Create</span> <span class="n">the</span> <span class="n">Authorizer</span>
+<span class="p">@</span><span class="n">ApplicationScoped</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">CustomAuthorizer</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">Secures</span>
+    <span class="p">@</span><span class="n">CustomSecurityBinding</span>
+    <span class="n">public</span> <span class="n">boolean</span> <span class="n">doSecuredCheck</span><span class="p">(</span><span class="n">InvocationContext</span> <span class="n">invocationContext</span><span class="p">,</span> <span class="n">BeanManager</span> <span class="n">manager</span><span class="p">,</span> <span class="p">@</span><span class="n">LoggedIn</span> <span class="n">User</span> <span class="n">user</span><span class="p">)</span> <span class="n">throws</span> <span class="n">Exception</span>
+    <span class="p">{</span>
+        <span class="k">return</span> <span class="n">user</span><span class="p">.</span><span class="n">isLoggedIn</span><span class="p">();</span> <span class="o">//</span> <span class="n">perform</span> <span class="n">security</span> <span class="n">check</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>We can then use our new annotation to secure business or bean methods. This binding annotation may be placed on the entire class (securing all methods,) or on individual methods that you wish to secure.</p>
+<div class="codehilite"><pre><span class="n">Secure</span> <span class="n">a</span> <span class="n">bean</span> <span class="n">method</span>
+<span class="p">@</span><span class="n">ApplicationScoped</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">SecuredBean1</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">CustomSecurityBinding</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">doSomething</span><span class="p">(</span><span class="n">Thing</span> <span class="n">thing</span><span class="p">)</span>
+    <span class="p">{</span>
+        <span class="n">thing</span><span class="p">.</span><span class="n">doSomething</span><span class="p">();</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>Next, we may access parameter values from the method invocation directly in our authorizer bean by creating custom @SecurityParameterBinding types; this is a simple step once we have completed the work above:</p>
+<div class="codehilite"><pre><span class="n">Create</span> <span class="n">a</span> <span class="n">parameter</span> <span class="n">binding</span> <span class="n">annotation</span>
+<span class="err">@</span><span class="n">Retention</span><span class="p">(</span><span class="n">value</span> <span class="o">=</span> <span class="n">RUNTIME</span><span class="p">)</span>
+<span class="err">@</span><span class="n">Target</span><span class="p">({</span><span class="n">PARAMETER</span><span class="p">})</span>
+<span class="err">@</span><span class="n">Documented</span>
+<span class="err">@</span><span class="n">SecurityParameterBinding</span>
+<span class="n">public</span> <span class="err">@</span><span class="n">interface</span> <span class="n">CurrentThing</span> <span class="p">{</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>Now, when a secured method is invoked, we can inject actual parameter values as arguments into our authorizer method, providing domain-level security in our applications:</p>
+<div class="codehilite"><pre><span class="n">Update</span> <span class="n">the</span> <span class="n">Authorizer</span> <span class="n">to</span> <span class="n">use</span> <span class="n">parameter</span> <span class="n">binding</span>
+<span class="p">@</span><span class="n">ApplicationScoped</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">CustomAuthorizer</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">Secures</span>
+    <span class="p">@</span><span class="n">CustomSecurityBinding</span>
+    <span class="n">public</span> <span class="n">boolean</span> <span class="n">doSecuredCheck</span><span class="p">(</span><span class="n">InvocationContext</span> <span class="n">invocationContext</span><span class="p">,</span> <span class="n">BeanManager</span> <span class="n">manager</span><span class="p">,</span> <span class="p">@</span><span class="n">LoggedIn</span> <span class="n">User</span> <span class="n">user</span><span class="p">,</span> <span class="p">@</span><span class="n">CurrentThing</span> <span class="n">Thing</span> <span class="n">thing</span><span class="p">)</span> <span class="n">throws</span> <span class="n">Exception</span>
+    <span class="p">{</span>
+        <span class="k">return</span> <span class="n">thing</span><span class="p">.</span><span class="n">hasMember</span><span class="p">(</span><span class="n">user</span><span class="p">);</span> <span class="o">//</span> <span class="n">perform</span> <span class="n">security</span> <span class="n">check</span> <span class="n">against</span> <span class="n">our</span> <span class="n">method</span> <span class="n">parameter</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>Note that our business method must also be annotated.</p>
+<div class="codehilite"><pre><span class="n">Complete</span> <span class="n">the</span> <span class="n">parameter</span> <span class="n">binding</span>
+<span class="p">@</span><span class="n">ApplicationScoped</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">SecuredBean1</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">CustomSecurityBinding</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">doSomething</span><span class="p">(@</span><span class="n">CurrentThing</span> <span class="n">Thing</span> <span class="n">thing</span><span class="p">)</span>
+    <span class="p">{</span>
+        <span class="n">thing</span><span class="p">.</span><span class="n">doSomething</span><span class="p">();</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>Our method is now secured, and we are able to use given parameter values as part of our security authorizer!</p>
+<h2 id="integrating-3rd-party-security-frameworks">Integrating 3rd party security frameworks</h2>
+<h3 id="secured">@Secured</h3>
+<p>{{@Secured}} is build on {{@SecurityBindingType}} and a very simple alternative to the rest of the security module.
+It's a basic hook to integrate a custom security concept, 3rd party frameworks,... . It doesn't provide a full blown security concept like the rest of the security module, but other DeltaSpike modules ensure that the security concepts are integrated properly (e.g. correct behaviour within custom scope implementations,...). It just allows to integrate other security frameworks easily.</p>
+<p>(In MyFaces CODI it was originally a CDI interceptor. This part changed a bit, because between the interceptor and {{@Secured}} is the {{@SecurityBindingType}} concept which triggers {{@Secured}} as on possible approach. Therefore the basic behaviour remains the same and you can think about it like an interceptor.)</p>
+<div class="codehilite"><pre><span class="n">Securing</span> <span class="n">all</span> <span class="n">intercepted</span> <span class="k">methods</span> <span class="n">of</span> <span class="n">a</span> <span class="n">CDI</span> <span class="n">bean</span>
+<span class="o">//</span><span class="p">...</span>
+<span class="p">@</span><span class="n">Secured</span><span class="p">(</span><span class="n">CustomAccessDecisionVoter</span><span class="p">.</span><span class="n">class</span><span class="p">)</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">SecuredBean</span>
+<span class="p">{</span>
+    <span class="o">//</span><span class="p">...</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>or</p>
+<div class="codehilite"><pre><span class="n">Securing</span> <span class="n">specific</span> <span class="k">methods</span>
+<span class="o">//</span><span class="p">...</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">SecuredBean</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">Secured</span><span class="p">(</span><span class="n">CustomAccessDecisionVoter</span><span class="p">.</span><span class="n">class</span><span class="p">)</span>
+    <span class="n">public</span> <span class="n">String</span> <span class="n">getResult</span><span class="p">()</span>
+    <span class="p">{</span>
+        <span class="o">//</span><span class="p">...</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<h3 id="accessdecisionvoter">AccessDecisionVoter</h3>
+<p>This interface is (besides the {{Secured}} annotation) the most important part of the concept. Both artifact types are also the only required parts.</p>
+<div class="codehilite"><pre><span class="n">public</span> <span class="n">class</span> <span class="n">CustomAccessDecisionVoter</span> <span class="n">implements</span> <span class="n">AccessDecisionVoter</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">Override</span>
+    <span class="n">public</span> <span class="n">Set</span><span class="o">&lt;</span><span class="n">SecurityViolation</span><span class="o">&gt;</span> <span class="n">checkPermission</span><span class="p">(</span><span class="n">AccessDecisionVoterContext</span> <span class="n">accessDecisionVoterContext</span><span class="p">)</span>
+    <span class="p">{</span>
+        <span class="n">Method</span> <span class="n">method</span> <span class="p">=</span> <span class="n">accessDecisionVoterContext</span><span class="p">.</span><span class="o">&lt;</span><span class="n">InvocationContext</span><span class="o">&gt;</span><span class="n">getSource</span><span class="p">().</span><span class="n">getMethod</span><span class="p">();</span>
+
+        <span class="o">//</span><span class="p">...</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>[TODO] hint about the changed parameter/s</p>
+<h3 id="securityviolation">SecurityViolation</h3>
+<p>In case of a detected violation a {{SecurityViolation}} has to be added to the result returned by the {{AccessDecisionVoter}}.</p>
+<p>[TODO] AbstractAccessDecisionVoter</p>
+<h3 id="secured-and-stereotypes-with-custom-meta-data">@Secured and Stereotypes with custom Meta-data</h3>
+<p>If there are multiple {{AccessDecisionVoter}} and maybe in different constellations, it's easier to provide an expressive CDI stereotypes for it. Later on that also allows to change the behaviour in a central place.</p>
+<div class="codehilite"><pre><span class="n">Stereotype</span> <span class="n">support</span> <span class="n">of</span> <span class="err">@</span><span class="n">Secured</span><span class="p">}</span>
+<span class="err">@</span><span class="n">Named</span>
+<span class="err">@</span><span class="n">Admin</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">MyBean</span> <span class="n">implements</span> <span class="n">Serializable</span>
+<span class="p">{</span>
+  <span class="c1">//...</span>
+<span class="p">}</span>
+
+<span class="c1">//...</span>
+<span class="err">@</span><span class="n">Stereotype</span>
+<span class="err">@</span><span class="n">Secured</span><span class="p">(</span><span class="n">RoleAccessDecisionVoter</span><span class="p">.</span><span class="n">class</span><span class="p">)</span>
+<span class="n">public</span> <span class="err">@</span><span class="n">interface</span> <span class="n">Admin</span>
+<span class="p">{</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>Furthermore, it's possible to provide custom meta-data easily.</p>
+<div class="codehilite"><pre><span class="n">Stereotype</span> <span class="n">of</span> <span class="err">@</span><span class="n">Secured</span> <span class="n">with</span> <span class="n">custom</span> <span class="n">meta</span><span class="o">-</span><span class="n">data</span><span class="p">}</span>
+<span class="err">@</span><span class="n">Named</span>
+<span class="err">@</span><span class="n">Admin</span><span class="p">(</span><span class="n">securityLevel</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">MyBean</span> <span class="n">implements</span> <span class="n">Serializable</span>
+<span class="p">{</span>
+  <span class="c1">//...</span>
+<span class="p">}</span>
+
+<span class="c1">//...</span>
+<span class="err">@</span><span class="n">Stereotype</span>
+<span class="err">@</span><span class="n">Secured</span><span class="p">(</span><span class="n">RoleAccessDecisionVoter</span><span class="p">.</span><span class="n">class</span><span class="p">)</span>
+<span class="n">public</span> <span class="err">@</span><span class="n">interface</span> <span class="n">Admin</span>
+<span class="p">{</span>
+  <span class="kt">int</span> <span class="n">securityLevel</span><span class="p">();</span>
+<span class="p">}</span>
+
+<span class="err">@</span><span class="n">ApplicationScoped</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">RoleAccessDecisionVoter</span> <span class="n">implements</span> <span class="n">AccessDecisionVoter</span>
+<span class="p">{</span>
+    <span class="n">private</span> <span class="k">static</span> <span class="n">final</span> <span class="kt">long</span> <span class="n">serialVersionUID</span> <span class="o">=</span> <span class="o">-</span><span class="mi">8007511215776345835L</span><span class="p">;</span>
+
+    <span class="n">public</span> <span class="n">Set</span><span class="o">&lt;</span><span class="n">SecurityViolation</span><span class="o">&gt;</span> <span class="n">checkPermission</span><span class="p">(</span><span class="n">AccessDecisionVoterContext</span> <span class="n">voterContext</span><span class="p">)</span>
+    <span class="p">{</span>
+        <span class="n">Admin</span> <span class="n">admin</span> <span class="o">=</span> <span class="n">voterContext</span><span class="p">.</span><span class="n">getMetaDataFor</span><span class="p">(</span><span class="n">Admin</span><span class="p">.</span><span class="n">class</span><span class="p">.</span><span class="n">getName</span><span class="p">(),</span> <span class="n">Admin</span><span class="p">.</span><span class="n">class</span><span class="p">);</span>
+        <span class="kt">int</span> <span class="n">level</span> <span class="o">=</span> <span class="n">admin</span><span class="p">.</span><span class="n">securityLevel</span><span class="p">();</span>
+        <span class="c1">//...</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>{code}</p>
+<h2 id="accessdecisionvotercontext">AccessDecisionVoterContext</h2>
+<p>[TODO]</p>
+<h2 id="securitystrategy-spi">SecurityStrategy SPI</h2>
+<p>[TODO]</p>
+<h1 id="jpa">JPA</h1>
+<h2 id="transactional">@Transactional</h2>
+<p>This annotation is an alternative to transactional EJBs which allows to execute a method within a transaction.
+Before it's possible to start using the annotation, it's required to implement a CDI producer for an {{EntityManager}} and it's needed to inject the {{EntityManager}} in the bean which uses {{@Transactional}}. As shown later on it's also possible to use multiple qualifiers for using different {{EntityManager}}s.</p>
+<p>The following example shows a simple producer for an {{EntityManager}} and the corresponding dispose-method.
+Producing it as request scoped bean means that the dispose method will be called on finishing the request.
+As an alternative it's possible to use a special scope called {{@TransactionScoped}} provided by the same DeltaSpike module.</p>
+<div class="codehilite"><pre><span class="n">Producer</span> <span class="k">for</span> <span class="n">the</span> <span class="n">default</span> <span class="n">EntityManager</span>
+<span class="o">//</span><span class="p">...</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">EntityManagerProducer</span>
+<span class="p">{</span>
+    <span class="o">//</span><span class="n">or</span> <span class="n">manual</span> <span class="n">bootstrapping</span>
+    <span class="p">@</span><span class="n">PersistenceContext</span>
+    <span class="n">private</span> <span class="n">EntityManager</span> <span class="n">entityManager</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">Produces</span>
+    <span class="p">@</span><span class="n">RequestScoped</span>
+    <span class="n">protected</span> <span class="n">EntityManager</span> <span class="n">createEntityManager</span><span class="p">()</span>
+    <span class="p">{</span>
+        <span class="k">return</span> <span class="n">this</span><span class="p">.</span><span class="n">entityManager</span><span class="p">;</span>
+    <span class="p">}</span>
+
+    <span class="n">protected</span> <span class="n">void</span> <span class="n">closeEntityManager</span><span class="p">(@</span><span class="n">Disposes</span> <span class="n">EntityManager</span> <span class="n">entityManager</span><span class="p">)</span>
+    <span class="p">{</span>
+        <span class="k">if</span> <span class="p">(</span><span class="n">entityManager</span><span class="p">.</span><span class="n">isOpen</span><span class="p">())</span>
+        <span class="p">{</span>
+            <span class="n">entityManager</span><span class="p">.</span><span class="n">close</span><span class="p">();</span>
+        <span class="p">}</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>The following examples show how to use the {{EntityManager}} produced by the example above.</p>
+<div class="codehilite"><pre><span class="n">Beans</span> <span class="n">with</span> <span class="n">transactional</span> <span class="n">method</span>
+<span class="o">//</span><span class="p">...</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">TransactionalBean</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">Inject</span>
+    <span class="n">private</span> <span class="n">EntityManager</span> <span class="n">entityManager</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">Transactional</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">executeInTransaction</span><span class="p">()</span>
+    <span class="p">{</span>
+        <span class="o">//</span><span class="p">...</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="n">Simple</span> <span class="n">transactional</span> <span class="n">bean</span> <span class="p">(</span><span class="n">all</span> <span class="k">methods</span> <span class="n">transactional</span><span class="p">)</span>
+<span class="o">//</span><span class="p">...</span>
+<span class="p">@</span><span class="n">Transactional</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">TransactionalBean</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">Inject</span>
+    <span class="n">private</span> <span class="n">EntityManager</span> <span class="n">entityManager</span><span class="p">;</span>
+
+    <span class="o">//</span><span class="p">...</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>As illustrated in the following example it's also possible to use {{@Transactional}} for stereotypes.</p>
+<div class="codehilite"><pre><span class="n">Stereotype</span> <span class="k">for</span> <span class="n">transactional</span> <span class="n">beans</span> <span class="p">(</span><span class="o">+</span> <span class="n">usage</span><span class="p">)</span>
+<span class="err">@</span><span class="n">Stereotype</span>
+<span class="err">@</span><span class="n">Transactional</span>
+<span class="err">@</span><span class="n">ApplicationScoped</span>
+<span class="n">public</span> <span class="err">@</span><span class="n">interface</span> <span class="n">Repository</span>
+<span class="p">{</span>
+<span class="p">}</span>
+
+<span class="c1">//...</span>
+<span class="err">@</span><span class="n">Repository</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">TransactionalBean</span>
+<span class="p">{</span>
+    <span class="err">@</span><span class="n">Inject</span>
+    <span class="n">private</span> <span class="n">EntityManager</span> <span class="n">entityManager</span><span class="p">;</span>
+
+    <span class="c1">//...</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>Besides such simple usages, it's also supported to use qualifiers to access multiple persistence-units in parallel.
+The default qualifier for {{@Transactional}} is {{@Any}}. Therefore a transaction for every injected entity manager will be started.
+The example afterwards shows how to change this default behaviour.</p>
+<div class="codehilite"><pre><span class="n">Producer</span> <span class="k">for</span> <span class="n">multiple</span> <span class="n">entity</span> <span class="n">managers</span> <span class="p">(</span><span class="o">+</span> <span class="n">usage</span><span class="p">)</span>
+<span class="o">//</span><span class="p">...</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">EntityManagerProducer</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">PersistenceContext</span><span class="p">(</span><span class="n">unitName</span> <span class="p">=</span> &quot;<span class="n">firstDB</span>&quot;<span class="p">)</span>
+    <span class="n">private</span> <span class="n">EntityManager</span> <span class="n">firstEntityManager</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">PersistenceContext</span><span class="p">(</span><span class="n">unitName</span> <span class="p">=</span> &quot;<span class="n">secondDB</span>&quot;<span class="p">)</span>
+    <span class="n">private</span> <span class="n">EntityManager</span> <span class="n">secondEntityManager</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">Produces</span>
+    <span class="p">@</span><span class="n">First</span>
+    <span class="p">@</span><span class="n">RequestScoped</span>
+    <span class="n">protected</span> <span class="n">EntityManager</span> <span class="n">createFirstEntityManager</span><span class="p">()</span>
+    <span class="p">{</span>
+        <span class="k">return</span> <span class="n">this</span><span class="p">.</span><span class="n">firstEntityManager</span><span class="p">;</span>
+    <span class="p">}</span>
+
+    <span class="n">protected</span> <span class="n">void</span> <span class="n">closeFirstEntityManager</span><span class="p">(@</span><span class="n">Disposes</span> <span class="p">@</span><span class="n">First</span> <span class="n">EntityManager</span> <span class="n">entityManager</span><span class="p">)</span>
+    <span class="p">{</span>
+        <span class="k">if</span> <span class="p">(</span><span class="n">firstEntityManager</span><span class="p">.</span><span class="n">isOpen</span><span class="p">())</span>
+        <span class="p">{</span>
+            <span class="n">firstEntityManager</span><span class="p">.</span><span class="n">close</span><span class="p">();</span>
+        <span class="p">}</span>
+    <span class="p">}</span>
+
+    <span class="p">@</span><span class="n">Produces</span>
+    <span class="p">@</span><span class="n">Second</span>
+    <span class="p">@</span><span class="n">RequestScoped</span>
+    <span class="n">protected</span> <span class="n">EntityManager</span> <span class="n">createSecondEntityManager</span><span class="p">()</span>
+    <span class="p">{</span>
+        <span class="k">return</span> <span class="n">this</span><span class="p">.</span><span class="n">secondEntityManager</span><span class="p">;</span>
+    <span class="p">}</span>
+
+    <span class="n">protected</span> <span class="n">void</span> <span class="n">closeSecondEntityManager</span><span class="p">(@</span><span class="n">Disposes</span> <span class="p">@</span><span class="n">Second</span> <span class="n">EntityManager</span> <span class="n">entityManager</span><span class="p">)</span>
+    <span class="p">{</span>
+        <span class="k">if</span> <span class="p">(</span><span class="n">secondEntityManager</span><span class="p">.</span><span class="n">isOpen</span><span class="p">())</span>
+        <span class="p">{</span>
+            <span class="n">secondEntityManager</span><span class="p">.</span><span class="n">close</span><span class="p">();</span>
+        <span class="p">}</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+
+
+<span class="o">//</span><span class="p">...</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">FirstLevelTransactionBean</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">Inject</span>
+    <span class="n">private</span> <span class="p">@</span><span class="n">First</span> <span class="n">EntityManager</span> <span class="n">firstEntityManager</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">Inject</span>
+    <span class="n">private</span> <span class="n">NestedTransactionBean</span> <span class="n">nestedTransactionBean</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">Transactional</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">executeInTransaction</span><span class="p">()</span>
+    <span class="p">{</span>
+        <span class="o">//</span><span class="p">...</span>
+        <span class="n">this</span><span class="p">.</span><span class="n">nestedTransactionBean</span><span class="p">.</span><span class="n">executeInTransaction</span><span class="p">();</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="o">//</span><span class="p">...</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">NestedTransactionBean</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">Inject</span>
+    <span class="n">private</span> <span class="p">@</span><span class="n">Second</span> <span class="n">EntityManager</span> <span class="n">secondEntityManager</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">Transactional</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">executeInTransaction</span><span class="p">()</span>
+    <span class="p">{</span>
+        <span class="o">//</span><span class="p">...</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>The following example shows how to use only the specified {{EntityManager}}/s</p>
+<div class="codehilite"><pre><span class="n">Activating</span> <span class="n">entity</span> <span class="n">managers</span> <span class="n">manually</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">MultiTransactionBean</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">Inject</span>
+    <span class="n">private</span> <span class="n">EntityManager</span> <span class="n">defaultEntityManager</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">Inject</span>
+    <span class="n">private</span> <span class="p">@</span><span class="n">First</span> <span class="n">EntityManager</span> <span class="n">firstEntityManager</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">Inject</span>
+    <span class="n">private</span> <span class="p">@</span><span class="n">Second</span> <span class="n">EntityManager</span> <span class="n">secondEntityManager</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">Transactional</span><span class="p">(</span><span class="n">qualifier</span> <span class="p">=</span> <span class="n">Default</span><span class="p">.</span><span class="n">class</span><span class="p">)</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">executeInDefaultTransaction</span><span class="p">()</span>
+    <span class="p">{</span>
+    <span class="p">}</span>
+
+    <span class="p">@</span><span class="n">Transactional</span><span class="p">(</span><span class="n">qualifier</span> <span class="p">=</span> <span class="n">First</span><span class="p">.</span><span class="n">class</span><span class="p">)</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">executeInFirstTransaction</span><span class="p">()</span>
+    <span class="p">{</span>
+    <span class="p">}</span>
+
+    <span class="p">@</span><span class="n">Transactional</span><span class="p">(</span><span class="n">qualifier</span> <span class="p">=</span> <span class="n">Second</span><span class="p">.</span><span class="n">class</span><span class="p">)</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">executeInSecondTransaction</span><span class="p">()</span>
+    <span class="p">{</span>
+    <span class="p">}</span>
+
+    <span class="p">@</span><span class="n">Transactional</span><span class="p">(</span><span class="n">qualifier</span> <span class="p">=</span> <span class="p">{</span><span class="n">First</span><span class="p">.</span><span class="n">class</span><span class="p">,</span> <span class="n">Second</span><span class="p">.</span><span class="n">class</span><span class="p">})</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">executeInFirstAndSecondTransaction</span><span class="p">()</span>
+    <span class="p">{</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>All examples also work with nested calls. In the following example the transaction handling is done on the entry point (after FirstLevelTransactionBean#executeInTransaction).</p>
+<div class="codehilite"><pre><span class="n">Joining</span> <span class="n">existing</span> <span class="n">transaction</span> <span class="n">in</span> <span class="n">nested</span> <span class="n">call</span>
+<span class="o">//</span><span class="p">...</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">FirstLevelTransactionBean</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">Inject</span>
+    <span class="n">private</span> <span class="n">EntityManager</span> <span class="n">entityManager</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">Inject</span>
+    <span class="n">private</span> <span class="n">NestedTransactionBean</span> <span class="n">nestedTransactionBean</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">Transactional</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">executeInTransaction</span><span class="p">()</span>
+    <span class="p">{</span>
+        <span class="n">this</span><span class="p">.</span><span class="n">nestedTransactionBean</span><span class="p">.</span><span class="n">executeInTransaction</span><span class="p">();</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+
+<span class="o">//</span><span class="p">...</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">NestedTransactionBean</span>
+<span class="p">{</span>
+    <span class="p">@</span><span class="n">Inject</span>
+    <span class="n">private</span> <span class="n">EntityManager</span> <span class="n">entityManager</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">Transactional</span>
+    <span class="n">public</span> <span class="n">void</span> <span class="n">executeInTransaction</span><span class="p">()</span>
+    <span class="p">{</span>
+        <span class="o">//</span><span class="p">...</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>The final transaction handling for all {{EntityManager}} s is also done after the outermost transactional method if {{NestedTransactionBean}} uses a different {{EntityManager}}.
+So it's possible to catch an exception in {{FirstLevelTransactionBean}} e.g. to try an optional path instead of an immediate rollback.</p>
+<h2 id="transactionscoped">@TransactionScoped</h2>
+<p>{{@Transactional}} also starts a context which is available as long as the transaction started by {{@Transactional}}. Besides other beans you can use this scope for the {{EntityManager}} itself. That means the {{EntityManager}} will be closed after leaving the method annotated with {{@Transactional}}.</p>
+<div class="codehilite"><pre><span class="n">Producer</span> <span class="k">for</span> <span class="n">the</span> <span class="n">default</span> <span class="n">EntityManager</span> <span class="n">which</span> <span class="n">should</span> <span class="n">be</span> <span class="n">used</span> <span class="n">only</span> <span class="k">for</span> <span class="n">one</span> <span class="n">transaction</span>
+<span class="o">//</span><span class="p">...</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">EntityManagerProducer</span>
+<span class="p">{</span>
+    <span class="o">//</span><span class="n">or</span> <span class="n">manual</span> <span class="n">bootstrapping</span>
+    <span class="p">@</span><span class="n">PersistenceContext</span>
+    <span class="n">private</span> <span class="n">EntityManager</span> <span class="n">entityManager</span><span class="p">;</span>
+
+    <span class="p">@</span><span class="n">Produces</span>
+    <span class="p">@</span><span class="n">TransactionScoped</span>
+    <span class="n">protected</span> <span class="n">EntityManager</span> <span class="n">createEntityManager</span><span class="p">()</span>
+    <span class="p">{</span>
+        <span class="k">return</span> <span class="n">this</span><span class="p">.</span><span class="n">entityManager</span><span class="p">;</span>
+    <span class="p">}</span>
+
+    <span class="n">protected</span> <span class="n">void</span> <span class="n">closeEntityManager</span><span class="p">(@</span><span class="n">Disposes</span> <span class="n">EntityManager</span> <span class="n">entityManager</span><span class="p">)</span>
+    <span class="p">{</span>
+        <span class="k">if</span> <span class="p">(</span><span class="n">entityManager</span><span class="p">.</span><span class="n">isOpen</span><span class="p">())</span>
+        <span class="p">{</span>
+            <span class="n">entityManager</span><span class="p">.</span><span class="n">close</span><span class="p">();</span>
+        <span class="p">}</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+          </div>
+      </div>
+
+      <hr>
+
+      <footer>
+        <p>Copyright © 20011-2012 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 -->
+
+    <!-- Javascript
+    ================================================== -->
+    <!-- Placed at the end of the document so the pages load faster -->
+    <!--<script src="./deltaspike/resources/js/prettyfy.js"></script> -->
+    <script src="./deltaspike/resources/js/prettyprint.js"></script>
+    <script src="./deltaspike/resources/js/jquery.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-transition.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-alert.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-modal.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-dropdown.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-scrollspy.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-tab.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-tooltip.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-popover.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-button.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-collapse.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-carousel.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-typeahead.js"></script>
+
+</body>
+</html>
\ No newline at end of file



Mime
View raw message