Skip to main content

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

There should be no need to override the provider as the provider is only specified if a user wants a specific provider as by default there is no provider specified. Using the essentials properties as eclipselink properties would be a good idea.

Tom Ware wrote:
I like part 1 of the proposal.

I do not think that EclipseLink itself should allow itself to be selected as the JPA provider when the user has specifically chosen TopLink Essentials. To me, if a user requests a specific JPA provider another provider should not allow itself to be selected. Perhaps this is something that should be done within GlassFish rather than within EclipseLink.


Mitesh Meswani wrote:
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.



eclipselink-dev mailing list
eclipselink-dev mailing list

Back to the top