Use OpenJPA property values instead of Kodo-specific property values

WebLogic used Kodo instead of OpenJPA for its JPA 1.0 provider implementation. This rule detects Kodo-specific property values in the persistence.xml file, which must be located in META-INF folder.

The following table shows the values that can be converted:
Class Description
kodo.Log
  • Removes the values Configuration, Remote, Manage and Profile
  • Converts kodo.* to openjpa.*
kodo.ConnectionFactoryProperties
  • Valid values are QueryTimeout, PrettyPrint, PrettyPrintLineLength
  • Remove all other values.
kodo.ConnectionFactory2Properties
  • Valid values are QueryTimeout, PrettyPrint, PrettyPrintLineLength
  • Remove all other values.
kodo.MetaDataFactory
  • Valid values are jpa or org.apache.openjpa.persistence.PersistenceMetaDataFactory.
  • Remove all other values and set the value to jpa.
kodo.LockManager
  • Converts kodo.* to org.apache.openjpa.*
  • Aliases remain the same.
kodo.OrphanedKeyAction
  • Converts kodo.* to org.apache.openjpa.*
  • Aliases remain the same.
kodo.SavepointManager
  • Converts kodo.* to org.apache.openjpa.*
  • Aliases remain the same.
kodo.Sequence
  • Converts kodo.* to org.apache.openjpa.*
  • Aliases remain the same.
kodo.DataCache
  • Selects only the first cache entry. All other entries are discarded.
  • If the first entry is set to tangosol, lru, or gemfire, then the value is set to "true".
  • If the first entry has values, then those values are preserved; for example, true(CacheSize=100).
  • If the first entry is "false", then that value remains "false".
kodo.QueryCompilationCache
  • The value, kodo.util.CacheMap, is converted to org.apache.openjpa.util.CacheMap.
  • The value, java.util.HashMap, is converted to org.apache.openjpa.lib.util.ConcurrentHash.
  • Aliases remain the same.
kodo.jdbc.DBDictionary
  • Converts kodo.* to: org.apache.openjpa.*
  • Aliases remain the same.
kodo.jdbc.SchemaFactory
  • Converts kodo.* to: org.apache.openjpa.*
  • Aliases remain the same.
kodo.jdbc.MappingDefaults
  • Valid value is default
kodo.ee.ManagedRuntime
  • Converts kodo.* to: org.apache.openjpa.*
  • Aliases remain the same.

Note: WebSphere traditional V8.5.5 and Liberty Web Profile 6.0 uses OpenJPA for its JPA 2.0 implementation. WebSphere traditional V9.0 and Liberty's Java EE 7 JPA 2.1 implementation uses EclipseLink.