Return-Path: X-Original-To: apmail-deltaspike-users-archive@www.apache.org Delivered-To: apmail-deltaspike-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 99F4A1190A for ; Thu, 14 Aug 2014 12:05:23 +0000 (UTC) Received: (qmail 26198 invoked by uid 500); 14 Aug 2014 12:05:23 -0000 Delivered-To: apmail-deltaspike-users-archive@deltaspike.apache.org Received: (qmail 26165 invoked by uid 500); 14 Aug 2014 12:05:23 -0000 Mailing-List: contact users-help@deltaspike.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@deltaspike.apache.org Delivered-To: mailing list users@deltaspike.apache.org Received: (qmail 26153 invoked by uid 99); 14 Aug 2014 12:05:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Aug 2014 12:05:23 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of julianomqs@gmail.com designates 74.125.82.180 as permitted sender) Received: from [74.125.82.180] (HELO mail-we0-f180.google.com) (74.125.82.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Aug 2014 12:04:55 +0000 Received: by mail-we0-f180.google.com with SMTP id w61so984759wes.25 for ; Thu, 14 Aug 2014 05:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ulQ2OAnhGGEvnvglWK10pdiVkDh0EJzauJQq11EOVk4=; b=T7PmUca2reHwAub91vJWbO2QnYra2WAtGy6rrzBn4iyxV+1YoucVDRzq6lYbC5Bt6e Ra4UFynUUYBrMHPcjtVJHNGJmSi8ghaRWR9/2ciY0i/XWfRFQF5FNAr29zHGorX439rF QFQdSsRybBNDkz/jkjEjFR59XFzdq/ftBljbn78QQyPPsUiGF2Zh+k7JPAkov2sFsYQp SoyBLPDh7vHRH8ftAFd/nGysRxTbH1nqAz8nObEJtqIL7mlL4j9ESzJxr/jNbvRFaSc2 /4ETXgQ+hk+89GLj+WGIydPxlXuuiTIXv8oe1gD4oZFo0WKOmiOaptiS1TEGZTGUaMgN T5gg== MIME-Version: 1.0 X-Received: by 10.194.62.67 with SMTP id w3mr11419244wjr.32.1408017895239; Thu, 14 Aug 2014 05:04:55 -0700 (PDT) Received: by 10.216.150.3 with HTTP; Thu, 14 Aug 2014 05:04:55 -0700 (PDT) In-Reply-To: <53EC9A64.9040501@redhat.com> References: <53EC9A64.9040501@redhat.com> Date: Thu, 14 Aug 2014 09:04:55 -0300 Message-ID: Subject: Re: Deltaspike Data Module From: Juliano Marques To: users@deltaspike.apache.org Content-Type: multipart/alternative; boundary=047d7b872e9a7bb80d050095b673 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b872e9a7bb80d050095b673 Content-Type: text/plain; charset=UTF-8 With Wildfly 8, the alternative in beans.xml do not work, but the global alternative in apache-deltaspike.properties works. I had a problem with Deltaspike repositories and JTA datasources, and this resolves the problem. Thanks. Atenciosamente, *Juliano M.* On Thu, Aug 14, 2014 at 8:15 AM, Rafael Benevides wrote: > Yes. It's possible. > > Depending on your implementation, You may need to register the > `org.apache.deltaspike.jpa.impl.transaction.ContainerManagedTransactionStrategy` > as an alternative on your beans.xml > > or registered as globalAlternatives.org.apache.deltaspike.jpa.spi. > transaction.TransactionStrategy=org.apache.deltaspike.jpa.impl. > transaction.ContainerManagedTransactionStrategy on your > apache-deltaspike.properties if it doesn't work out of the box. > > Em 8/14/14, 4:24, Juliano Marques escreveu: > >> Hi, >> >> I want to use Deltaspike Data Module repositories, but I want to control >> transactions with EJBs, not within the repository, something like this: >> >> @Dependent >> @Repository >> public interface UnidadeRepository2 extends EntityRepository> Long> >> { >> } >> >> @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) >> public class UnidadeEJB { >> >> @Inject >> private UnidadeRepository2 repository; >> >> @TransactionAttribute(TransactionAttributeType.REQUIRED) >> public Unidade save(Unidade unidade) { >> return repository.saveAndFlush(unidade); >> } >> } >> >> Is this possible? >> >> >> Regards, >> >> *Juliano M.* >> >> > --047d7b872e9a7bb80d050095b673--