From 7268ed8f805241fd4e21343020d301f827c381af Mon Sep 17 00:00:00 2001 From: "A. Abram White" Date: Fri, 28 Jul 2006 01:16:51 +0000 Subject: [PATCH] Default transaction type to RESOURCE_LOCAL. Spec changed in late revision to default based on environment, rather than always defaulting to JTA. git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@426351 13f79535-47bb-0310-9956-ffa450edef68 --- .../openjpa/persistence/ConfigurationProviderImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConfigurationProviderImpl.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConfigurationProviderImpl.java index e60d5ac8e..85fd47057 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConfigurationProviderImpl.java +++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConfigurationProviderImpl.java @@ -354,10 +354,12 @@ public class ConfigurationProviderImpl _info = new PersistenceUnitInfoImpl(); _info.setPersistenceUnitName(attrs.getValue("name")); - // default is JTA according to spec + // we only parse this ourselves outside a container, so default + // transaction type to local String val = attrs.getValue("transaction-type"); if (val == null) - _info.setTransactionType(PersistenceUnitTransactionType.JTA); + _info.setTransactionType + (PersistenceUnitTransactionType.RESOURCE_LOCAL); else _info.setTransactionType(Enum.valueOf (PersistenceUnitTransactionType.class, val));