Relocate org.apache.openjpa.jdbc.kernel.MixedLockManager configuration to JDBC product derivation

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1161288 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2011-08-24 21:32:22 +00:00
parent 3842a3d1a9
commit 3cfadba263
2 changed files with 5 additions and 3 deletions

View File

@ -91,6 +91,9 @@ public class JDBCPersistenceProductDerivation
PersistenceMappingDefaults.class.getName());
conf.mappingDefaultsPlugin.setAlias(jpa.getName(),
PersistenceMappingDefaults.class.getName());
conf.lockManagerPlugin.setAlias("mixed", "org.apache.openjpa.jdbc.kernel.MixedLockManager");
return true;
}
@ -105,6 +108,8 @@ public class JDBCPersistenceProductDerivation
conf.mappingDefaultsPlugin.setDefault(jpa.getName());
conf.mappingDefaultsPlugin.setString(jpa.getName());
conf.lockManagerPlugin.setDefault("mixed");
conf.lockManagerPlugin.setString("mixed");
return true;
}

View File

@ -210,7 +210,6 @@ public class PersistenceProductDerivation
conf.writeLockLevel.setAlias("pessimistic-force-increment", String
.valueOf(MixedLockLevels.LOCK_PESSIMISTIC_FORCE_INCREMENT));
conf.lockManagerPlugin.setAlias("mixed", "org.apache.openjpa.jdbc.kernel.MixedLockManager");
configureBeanValidation(conf);
@ -279,8 +278,6 @@ public class PersistenceProductDerivation
OpenJPAConfigurationImpl conf = (OpenJPAConfigurationImpl) c;
conf.metaFactoryPlugin.setDefault(SPEC_JPA.getName());
conf.metaFactoryPlugin.setString(SPEC_JPA.getName());
conf.lockManagerPlugin.setDefault("mixed");
conf.lockManagerPlugin.setString("mixed");
conf.nontransactionalWrite.setDefault("true");
conf.nontransactionalWrite.set(true);
Specification spec = ((OpenJPAConfiguration) c).getSpecificationInstance();