Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] Facilitating migration from Toplink / Toplink Essentials to EclipseLink for pure JPA applications

Currently, an app using Toplink / Toplink Essentials as JPA provider (and not using any of provider specific features in code), will still need to be manually modified by user to change persistence.xml for property names from toplink.* to eclipselink.* and provider name from oracle.toplink.*.EntityManagerFactoryProvider to org.eclipse.persistence.jpa.PersistenceProvider. We know that EclipseLink has a migration tool that helps user with this. However, using the tool would require manual steps from user. It might not be possible/convenient for many users to change their packaged application (like .ear and .war) for this. This issue came up during discussion about upgrade from GlassFish V2 to V3

1. We translate the property names and provider during deploy. This would help ease migration from Toplink to EclipseLink for majority of  JPA users who would mainly be using toplink.jdbc.* properties in their persistence.xml.
2. We accept oracle.toplink.*.EntityManagerFactoryProvider as a supported class name

To be more specific, for 1 above, we enhance EntityManagerSetupImpl#deploy() to translate old toplink properties in addition to translation that it is doing now. For 2 above, we enhance JPAInitializer.isPersistenceProviderSupported(String className)  to accept oracle.toplink.*.EntityManagerFactoryProvider as a supported provider. To facilitate the use case where a user explicitly wants to use Toplink, we can try to be clever in accpeting toplink as a supported provider only if Toplink is not found in classpath.

I can work on implementing this. Please reply with your thoughts/comments.


Back to the top