You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by bu...@apache.org on 2013/04/04 03:24:59 UTC

svn commit: r857182 - in /websites/staging/deltaspike/trunk/content: ./ deltaspike/jpa.html

Author: buildbot
Date: Thu Apr  4 01:24:59 2013
New Revision: 857182

Log:
Staging update by buildbot for deltaspike

Modified:
    websites/staging/deltaspike/trunk/content/   (props changed)
    websites/staging/deltaspike/trunk/content/deltaspike/jpa.html

Propchange: websites/staging/deltaspike/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Apr  4 01:24:59 2013
@@ -1 +1 @@
-1463291
+1464249

Modified: websites/staging/deltaspike/trunk/content/deltaspike/jpa.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/deltaspike/jpa.html (original)
+++ websites/staging/deltaspike/trunk/content/deltaspike/jpa.html Thu Apr  4 01:24:59 2013
@@ -89,6 +89,16 @@
 <h1 id="transactional">@Transactional</h1>
 <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 <code>EntityManager</code> and it's needed to inject the <code>EntityManager</code> in the bean which uses <code>@Transactional</code>. As shown later on it's also possible to use multiple qualifiers for using different <code>EntityManager</code>s.</p>
+<p><strong>Hint:</strong>
+If you are using features described by this page and the CDI container you are using is Weld (or OpenWebBeans in BDA mode), you have to enable the security interceptor in your beans.xml file:</p>
+<div class="codehilite"><pre><span class="nt">&lt;beans&gt;</span>
+    <span class="nt">&lt;interceptors&gt;</span>
+        <span class="nt">&lt;class&gt;</span>org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor<span class="nt">&lt;/class&gt;</span>
+    <span class="nt">&lt;/interceptors&gt;</span>
+<span class="nt">&lt;/beans&gt;</span>
+</pre></div>
+
+
 <p>The following example shows a simple producer for an <code>EntityManager</code> 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 <code>@TransactionScoped</code> provided by the same DeltaSpike module.</p>