Return-Path: X-Original-To: apmail-incubator-deltaspike-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-deltaspike-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6FDD2FAB3 for ; Thu, 4 Apr 2013 01:23:58 +0000 (UTC) Received: (qmail 47556 invoked by uid 500); 4 Apr 2013 01:23:58 -0000 Delivered-To: apmail-incubator-deltaspike-commits-archive@incubator.apache.org Received: (qmail 47506 invoked by uid 500); 4 Apr 2013 01:23:58 -0000 Mailing-List: contact deltaspike-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltaspike-dev@incubator.apache.org Delivered-To: mailing list deltaspike-commits@incubator.apache.org Received: (qmail 47496 invoked by uid 99); 4 Apr 2013 01:23:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Apr 2013 01:23:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Apr 2013 01:23:56 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CCDF02388A2C; Thu, 4 Apr 2013 01:23:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1464249 - /incubator/deltaspike/site/trunk/content/deltaspike/jpa.mdtext Date: Thu, 04 Apr 2013 01:23:36 -0000 To: deltaspike-commits@incubator.apache.org From: clerum@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130404012336.CCDF02388A2C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: clerum Date: Thu Apr 4 01:23:36 2013 New Revision: 1464249 URL: http://svn.apache.org/r1464249 Log: CMS commit to deltaspike by clerum Modified: incubator/deltaspike/site/trunk/content/deltaspike/jpa.mdtext Modified: incubator/deltaspike/site/trunk/content/deltaspike/jpa.mdtext URL: http://svn.apache.org/viewvc/incubator/deltaspike/site/trunk/content/deltaspike/jpa.mdtext?rev=1464249&r1=1464248&r2=1464249&view=diff ============================================================================== --- incubator/deltaspike/site/trunk/content/deltaspike/jpa.mdtext (original) +++ incubator/deltaspike/site/trunk/content/deltaspike/jpa.mdtext Thu Apr 4 01:23:36 2013 @@ -25,6 +25,15 @@ Notice: Licensed to the Apache Softwa 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. +**Hint:** +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: + + + + org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor + + + 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.