Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Examples/JPA/Migration/OpenJPA/PersistenceXML"

< EclipseLink‎ | Examples‎ | JPA‎ | Migration‎ | OpenJPA
Line 1: Line 1:
== OpenJPA to EclipseLink: Persistence XML  ==
+
== Migration from OpenJPA to EclipseLink: Persistence XML  ==
 +
 
 +
''NOTE: Under Construction''
 +
 
 +
When migrating it is important to first address the changes required in the persistence.XML file. If you encounter any migration issues in the persistence.xml file not covered here or incomplete please log a [https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EclipseLink&bug_severity=enhancement documentation enhancement request] referencing this page and describe your migration challenge.
  
 
=== Provider ===
 
=== Provider ===
Line 8: Line 12:
 
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
 
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
 
</source>
 
</source>
 +
 +
==== JavaSE USage ====
 +
 +
It has been reported that in JavaSE usage of OpenJPA the provider resolver functionality may continue to use OpenJPA if it is encountered first on the classpath and ignore the specified <provider>. If this is encountered the best solution is to remove OpenJPA from the classpath of your application or test harness.
  
 
=== PU Properties ===
 
=== PU Properties ===
  
The following table captures the OpneJPA persistence unit properties and their corresponding EclipseLink JPA properties.
+
Persistence Unit properties are a standard mechanism for providing vendor specific configuration. They are most common used to handle the configuration of:
 +
* JDBC pooling
 +
* Cache configuration and usage
 +
 
 +
The following table captures the OpneJPA persistence unit properties and their corresponding EclipseLink JPA properties.
 +
 
 +
'' NOTE: This is complex mapping task requiring knowledge of both solutions. Not all properties will have a direct mapping.''
 +
 
 +
Please refer to the [[Using_EclipseLink_JPA_Extensions_%28ELUG%29 EclipseLink UserGuide (ELUG)]'s extended JPA functionality for a description of all supported properties or see the [http://www.eclipse.org/eclipselink/api/latest/org/eclipse/persistence/config/PersistenceUnitProperties.html PersistenceUnitProperties JavaDocs].
  
 
{|{{BMTableStyle}}
 
{|{{BMTableStyle}}

Revision as of 04:34, 3 November 2009

Migration from OpenJPA to EclipseLink: Persistence XML

NOTE: Under Construction

When migrating it is important to first address the changes required in the persistence.XML file. If you encounter any migration issues in the persistence.xml file not covered here or incomplete please log a documentation enhancement request referencing this page and describe your migration challenge.

Provider

The JPA persistence provider typically needs to be set during any migration to ensure the EclipseLink JPA provider is used in case multiple providers exist in the target container.

<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

JavaSE USage

It has been reported that in JavaSE usage of OpenJPA the provider resolver functionality may continue to use OpenJPA if it is encountered first on the classpath and ignore the specified <provider>. If this is encountered the best solution is to remove OpenJPA from the classpath of your application or test harness.

PU Properties

Persistence Unit properties are a standard mechanism for providing vendor specific configuration. They are most common used to handle the configuration of:

  • JDBC pooling
  • Cache configuration and usage

The following table captures the OpneJPA persistence unit properties and their corresponding EclipseLink JPA properties.

NOTE: This is complex mapping task requiring knowledge of both solutions. Not all properties will have a direct mapping.

Please refer to the [[Using_EclipseLink_JPA_Extensions_%28ELUG%29 EclipseLink UserGuide (ELUG)]'s extended JPA functionality for a description of all supported properties or see the PersistenceUnitProperties JavaDocs.

OpenJPA Property Description EclipseLink JPA Equivalent
openjpa.AutoClear
openjpa.AutoDetach
openjpa.BrokerFactory
openjpa.BrokerImpl
openjpa.ClassResolver
openjpa.Compatibility
openjpa.ConnectionDriverName eclipselink.jdbc.driver
openjpa.ConnectionFactory
openjpa.ConnectionFactoryName
openjpa.ConnectionFactoryMode
openjpa.ConnectionFactoryProperties
openjpa.ConnectionPassword eclipselink.jdbc.password
openjpa.ConnectionProperties
openjpa.ConnectionURL eclipselink.jdbc.url
openjpa.ConnectionUserName eclipselink.jdbc.user
openjpa.Connection2DriverName
openjpa.Connection2Properties
openjpa.ConnectionFactory2Name
openjpa.ConnectionFactory2
openjpa.ConnectionFactory2Properties
openjpa.Connection2Password
openjpa.Connection2UserName
openjpa.Connection2URL
openjpa.ConnectionRetainMode
openjpa.DataCache
openjpa.DataCacheManager
openjpa.DataCacheTimeout
openjpa.DetachState
openjpa.DynamicDataStructs
openjpa.FetchBatchSize
openjpa.FetchGroups
openjpa.FlushBeforeQueries
openjpa.IgnoreChanges
openjpa.Id
openjpa.InverseManager
openjpa.LockManager
openjpa.LockTimeout
openjpa.Log Possible values: openjpa, commons, log4j, none eclipselink.logging.logger with values DefaultLogger, JavaLogger, ServerLogger, or custom
openjpa.ManagedRuntime
openjpa.Mapping
openjpa.MaxFetchDepth
openjpa.MetaDataFactory
openjpa.Multithreaded
openjpa.Optimistic
openjpa.OrphanedKeyAction
openjpa.NontransactionalRead
openjpa.NontransactionalWrite
openjpa.ProxyManager
openjpa.QueryCache
openjpa.QueryCompilationCache
openjpa.ReadLockLevel
openjpa.RemoteCommitProvider
openjpa.RestoreState
openjpa.RetainState
openjpa.RetryClassRegistration
openjpa.SavepointManager
openjpa.Sequence
openjpa.TransactionMode
openjpa.WriteLockLevel

Back to the top