Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » spring configuration for eclipselink spring-data jpa(spring configuration for eclipselink spring-data jpa)
spring configuration for eclipselink spring-data jpa [message #1856740] Tue, 27 December 2022 13:23 Go to next message
Sanjana C is currently offline Sanjana CFriend
Messages: 31
Registered: December 2022
Member
HI,

I am new to eclipselink. In my application we are trying to migrate from toplink to eclipselink as a reason spring 4.x version doesnot support toplink.

So we are using spring application(not a spring boot) where iam trying to use spring data jpa with eclipselink as jpa provider.

Could you please help me out of how can i configure it in spring xml to use eclipselink as a spring jpa provider?
Re: spring configuration for eclipselink spring-data jpa [message #1856752 is a reply to message #1856740] Wed, 28 December 2022 19:27 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 54
Registered: December 2021
Member
Are you doing a new rewrite of the app to use Spring JPA? Otherwise, TopLink -> EclipseLink should be straight forward with just package (and in spring, class) names changing.

https://wiki.eclipse.org/EclipseLink/Examples/JPA/Spring shows a setup of EclipseLink against Spring 2.0 - it should be pretty similar in Spring 4.x as the EclipseLinkJpaVendorAdapter and EclipseLinkJpaDialect were added in Spring 2.5.
You might also want to see https://www.baeldung.com/spring-eclipselink as it comes from a different reference point.

Best Regards,
Chris
Re: spring configuration for eclipselink spring-data jpa [message #1856796 is a reply to message #1856752] Tue, 03 January 2023 07:37 Go to previous messageGo to next message
Sanjana C is currently offline Sanjana CFriend
Messages: 31
Registered: December 2022
Member
Hi Chris ,
Thanks for the reply.
Iam able to configure spring data jpa with eclipselink provider

We are using ToplinkdaoSupport provided by spring 2.0 version and toplink template. Now as we need to migrate our application from oracle 11g to 12c, spring version from 2.0 to 3.0 version we are doing R&D on which solution would be better suitable for our application as spring doesn't support toplink in latest version.
* replacing toplinkdaosupport implemented classed with eclipselink persistence (which is straight forward)
*using spring data jpa with eclipselink jpa vendor instead of entity manager( still doing some poc on it)

So could you please let me know will spring data jpa supports Expression builder api of eclipse link that we use for some custome queries?
Re: spring configuration for eclipselink spring-data jpa [message #1856827 is a reply to message #1856796] Wed, 04 January 2023 16:49 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 54
Registered: December 2021
Member
I am surprised that what ever TopLink support existed in Spring won't work with the latest TopLink versions - not much has changed that I'm aware (well, a lot, as it uses EclipseLink under the covers now, but my understanding was it should mostly work the same).

TopLink->EclipseLink migrations are really just package renaming. With that in mind, you should be able to use EclipseLink native query expression with EclipseLink as the provider. I'm not a Spring expert but believe it only exposes JPA, so you may need to get at the sessions you are used to by unwrapping EntityManagers. It is certainly possible, and even with little Spring knowledge, I was able to write one for a project last year based on the how-tos and forum posts google finds (but no longer have access to it).

Let us know if you have problems and best of luck
Previous Topic:Eclipse Link 4.0.0/MongoDB 6.0.1 unable to connect authSource param missing.
Next Topic:Wrong type returned for aggregate functions over date?
Goto Forum:
  


Current Time: Thu Dec 05 13:38:10 GMT 2024

Powered by FUDForum. Page generated in 0.05017 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top