aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From timothyjw...@apache.org
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 GMT
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 @@
 			<scope>provided</scope>
 		</dependency>
 		<dependency>
-			<groupId>org.eclipse.persistence</groupId>
-			<artifactId>org.eclipse.persistence.jpa</artifactId>
-			<version>2.0.0</version>
-			<scope>provided</scope>
-		</dependency>
-		<dependency>
 			<groupId>org.hibernate</groupId>
 			<artifactId>hibernate-core</artifactId>
 			<version>5.0.0.Final</version>

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



Mime
View raw message