mirror of https://github.com/apache/openjpa.git
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
This commit is contained in:
parent
1236605135
commit
7268ed8f80
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue