Return-Path: X-Original-To: apmail-aries-commits-archive@www.apache.org Delivered-To: apmail-aries-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AD92819F43 for ; Thu, 14 Apr 2016 16:05:41 +0000 (UTC) Received: (qmail 26239 invoked by uid 500); 14 Apr 2016 16:05:41 -0000 Delivered-To: apmail-aries-commits-archive@aries.apache.org Received: (qmail 26180 invoked by uid 500); 14 Apr 2016 16:05:41 -0000 Mailing-List: contact commits-help@aries.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aries.apache.org Delivered-To: mailing list commits@aries.apache.org Received: (qmail 26167 invoked by uid 99); 14 Apr 2016 16:05:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Apr 2016 16:05:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 17C34C0E0E for ; Thu, 14 Apr 2016 16:05:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.799 X-Spam-Level: * X-Spam-Status: No, score=1.799 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id oVEBUwFPW8ca for ; Thu, 14 Apr 2016 16:05:40 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id ABC4F5FAEA for ; Thu, 14 Apr 2016 16:05:39 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C2348E0054 for ; Thu, 14 Apr 2016 16:05:38 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id D55AD3A0216 for ; Thu, 14 Apr 2016 16:05:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1739132 - in /aries/trunk/tx-control/tx-control-provider-jpa-xa: ./ src/main/java/org/apache/aries/tx/control/jpa/xa/impl/ Date: Thu, 14 Apr 2016 16:05:37 -0000 To: commits@aries.apache.org From: timothyjward@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160414160537.D55AD3A0216@svn01-us-west.apache.org> Author: timothyjward Date: Thu Apr 14 16:05:37 2016 New Revision: 1739132 URL: http://svn.apache.org/viewvc?rev=1739132&view=rev Log: [tx-control] Ensure that EclipseLink usee the non-jta-datasource for sequence generation Modified: aries/trunk/tx-control/tx-control-provider-jpa-xa/pom.xml aries/trunk/tx-control/tx-control-provider-jpa-xa/src/main/java/org/apache/aries/tx/control/jpa/xa/impl/JPAEntityManagerProviderFactoryImpl.java aries/trunk/tx-control/tx-control-provider-jpa-xa/src/main/java/org/apache/aries/tx/control/jpa/xa/impl/ManagedJPAEMFLocator.java Modified: aries/trunk/tx-control/tx-control-provider-jpa-xa/pom.xml URL: http://svn.apache.org/viewvc/aries/trunk/tx-control/tx-control-provider-jpa-xa/pom.xml?rev=1739132&r1=1739131&r2=1739132&view=diff ============================================================================== --- aries/trunk/tx-control/tx-control-provider-jpa-xa/pom.xml (original) +++ aries/trunk/tx-control/tx-control-provider-jpa-xa/pom.xml Thu Apr 14 16:05:37 2016 @@ -102,12 +102,6 @@ provided - org.eclipse.persistence - org.eclipse.persistence.jpa - 2.0.0 - provided - - org.hibernate hibernate-core 5.0.0.Final Modified: aries/trunk/tx-control/tx-control-provider-jpa-xa/src/main/java/org/apache/aries/tx/control/jpa/xa/impl/JPAEntityManagerProviderFactoryImpl.java URL: http://svn.apache.org/viewvc/aries/trunk/tx-control/tx-control-provider-jpa-xa/src/main/java/org/apache/aries/tx/control/jpa/xa/impl/JPAEntityManagerProviderFactoryImpl.java?rev=1739132&r1=1739131&r2=1739132&view=diff ============================================================================== --- aries/trunk/tx-control/tx-control-provider-jpa-xa/src/main/java/org/apache/aries/tx/control/jpa/xa/impl/JPAEntityManagerProviderFactoryImpl.java (original) +++ aries/trunk/tx-control/tx-control-provider-jpa-xa/src/main/java/org/apache/aries/tx/control/jpa/xa/impl/JPAEntityManagerProviderFactoryImpl.java Thu Apr 14 16:05:37 2016 @@ -51,7 +51,7 @@ public class JPAEntityManagerProviderFac DataSource ds = (DataSource) jpaProperties.get("javax.persistence.jtaDataSource"); if(!jpaProperties.containsKey("javax.persistence.nonJtaDataSource")) { - toReturn.put("javax.persistence.jtaDataSource", ds); + toReturn.put("javax.persistence.nonJtaDataSource", ds); } toReturn.put("javax.persistence.jtaDataSource", new EnlistingDataSource(tx, ds)); Modified: aries/trunk/tx-control/tx-control-provider-jpa-xa/src/main/java/org/apache/aries/tx/control/jpa/xa/impl/ManagedJPAEMFLocator.java URL: http://svn.apache.org/viewvc/aries/trunk/tx-control/tx-control-provider-jpa-xa/src/main/java/org/apache/aries/tx/control/jpa/xa/impl/ManagedJPAEMFLocator.java?rev=1739132&r1=1739131&r2=1739132&view=diff ============================================================================== --- aries/trunk/tx-control/tx-control-provider-jpa-xa/src/main/java/org/apache/aries/tx/control/jpa/xa/impl/ManagedJPAEMFLocator.java (original) +++ aries/trunk/tx-control/tx-control-provider-jpa-xa/src/main/java/org/apache/aries/tx/control/jpa/xa/impl/ManagedJPAEMFLocator.java Thu Apr 14 16:05:37 2016 @@ -172,6 +172,11 @@ public class ManagedJPAEMFLocator implem props.put("eclipselink.target-server", pluginClazz.getName()); props.put("org.apache.aries.jpa.eclipselink.plugin.types", pluginClazz); + // This is needed to ensure that sequences can be generated in nested + // transactions without blowing up. + if(!props.containsKey("eclipselink.jdbc.sequence-connection-pool")) { + props.put("eclipselink.jdbc.sequence-connection-pool", "true"); + } } else { // TODO log a warning and give up