Forums Register Login

Toplink witth JPA vs Toplink API

+Pie Number of slices to send: Send
Hi ORM experts -
I am new to ORM technolgies. I am involved in a project in its initial statges in which we have decide to go with Toplink. My question to you all is which approach to go with -
Should we go with Toplink and JPA or with Toplink API for development?
Initial analysis seems to suggest Development with Toplink API will be quick and will have more feature.
But I would like to have some expert opinions.
Thanks in advance.
Anand
+Pie Number of slices to send: Send
Speed really won;t be the factor here, it is the same speed.

You will get more features with Toplink APIs that are not implementation of the JPA spec. However, with specific APIs you become more vendor locked. But that occurs with all ORMs that implement JPA, they also have vendor specific APIs that you can use to get some extra features that the JPA spec doesn't cover.

But if you stay with the JPA spec, then you can swap out the vendor easily with any other JPA spec compliant vendor.

Personally, I would take your choice of JPA vendor, and use as much JPA spec compliant code as you can and only use vendor specific code when necessary. Sometimes you can even quarantine the vendor specific code in helper classes, but that is up to your architect if you want to take that approach.

Mark
+Pie Number of slices to send: Send
Thanks Mark. As you have suggested JPA is what is preferred. Looks like we have to start fresh with JPA now .
+Pie Number of slices to send: Send
TopLink 11g (preview) (as well as EclipseLink) make most of the TopLink feature set available through JPA. So you can use JPA, and still get access to most of the TopLink functionality that goes beyond the JPA spec.

TopLink provides extended annotations for caching, performance, locking, advanced mappings, and stored procedure queries. You can also use DescriptorCustomizers and SessionCustomizers to access most other features.

The TopLink EntityManager also gives you access to the TopLink Session and UnitOfWork interfaces to allow access to additional functionality if required.
+Pie Number of slices to send: Send
 

Originally posted by Anand Sid:
Thanks Mark. As you have suggested JPA is what is preferred. Looks like we have to start fresh with JPA now .



Not sure why you have to start "fresh". I think you might be getting confused and thinking you have to either choose JPA or TopLink. Whereas it isn't an either or, it is TopLink implements JPA.

Mark
+Pie Number of slices to send: Send
Mark is right (as usual :-). It is not an either/or, and if you are thinking that you already know the TopLink API and don't want to have to learn a different API then you need not fear. Anyone that is familiar with TopLink, Hibernate, or any other popular ORM API for that matter, will be able to pick up JPA in no time.

Furthermore, one other thing that I wanted to mention is that if you have already started your project using the TopLink API you can actually access the TopLink session in other parts of the app through a JPA EntityManager, so you can pick whatever API you want to use at any time without having to change existing code!

Seriously. The world's your oyster
+Pie Number of slices to send: Send
First of all Thanks to you all - Mike, Mark and James for all you suggestions.
Yes most of us here have been using Toplink API for doing a sort of Proof of Concept (POC). So we are currently comfortable using Toplink API. But after looking at JPA Api we found that the we have to change most of the API calls. Thanks for the Tip on EntityManager. But since we are in a POC phase we can change the Toplink API code written so far to JPA code. Based on you suggestion I feel that it shouldn't that difficult.
+Pie Number of slices to send: Send
 

Originally posted by James Sutherland:
TopLink 11g (preview) (as well as EclipseLink) make most of the TopLink feature set available through JPA. So you can use JPA, and still get access to most of the TopLink functionality that goes beyond the JPA spec.


Hi James -
Since you have mentioned Toplink 11g. I have a question on 10g.
We are using TopLink 10.1.3.3 and also we are using Toplink workbench extensively to do mapping.
I have a few questions and I hope you could answer them -
Is it possible to get the Toplink functionalities (Not part of the JPA spec) through JPA in Toplink 10.1.3.3?

Can we use 10.1.3.3 and use the mapping done using workbench for JPA based implementation?


Thanks in Advance.
Lookout! Runaway whale! Hide behind this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2990 times.
Similar Threads
Hibernate suppourt with JPA
JPA and Hiberate
Why is JPA used with in Combination with ORM like Hibernate
How different EJB 3.0 is from Hibernate ?
JPA EclipseLink orm.xml and persistence.xml
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:07:42.