File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes A question for the authors present this week Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "A question for the authors present this week" Watch "A question for the authors present this week" New topic

A question for the authors present this week

Rodrigo Bossini
Ranch Hand

Joined: Jul 03, 2009
Posts: 113

Today we have many applications that use regular JDBC connections. I'd like to know how worth it would be to migrate them to use JPA. What would be the advantages?

Thank you.

I see wind mills
Mike Keith
Ranch Hand

Joined: Jul 14, 2005
Posts: 304
It really depends on the application. If you convert the result sets to objects, and find that you need to keep maintaining your JDBC layer and that it is growing in size and complexity, it is probably a good candidate for being migrated to JPA. On the other hand, if it is pretty much doing what you need it to do and you are happy with it in terms of its performance and maintainability then don't change what isn't broken. JPA becomes advantageous for applications that have data that maps to object graphs (with relationships), that execute multiple kinds of queries over the objects, and that regularly navigate the object model. Because JPA providers do a lot of caching in memory, JPA tends to perform better than JDBC when there is more object reuse.

Pro JPA 2: Mastering the Java Persistence API
I agree. Here's the link:
subject: A question for the authors present this week
It's not a secret anymore!