Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question for the authors present this week

 
Rodrigo Bossini
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.
 
Mike Keith
author
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic