File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Comparing Persistence Frameworks

 
antonio bartulovic
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey!

I am looking for an easy way to map objects in a huge database based on a jee applications. This JEE Application will supports Java1.5 and EJB3

My candidates are:
- pureQuery(tm)
- JDBC native
- Hibernate
- Spring

On my first web inquiries I saw that the newer hibernate versions are using simple annotiations, where a developer doesnt need to write XML files. Thats a pretty good thing. But which "Framework" is recommended?

PS: It is important to map several tables in one object!
[ February 19, 2008: Message edited by: antonio bartulovic ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why didn't you also include Oracle's Toplink?

I am too biased, so I won't give my opinion, except to not use JDBC, to much code to write.

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, and Spring is not an ORM Persistence Framework. So you can still use Spring, with any ORM, so to speak.

Mark
 
antonio bartulovic
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using DB2 Databases, is Toplink supporting these DBMS?

You're right about Spring. But it includes features for using ORM much comfortable.
 
Mike Keith
author
Ranch Hand
Posts: 304
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by antonio bartulovic:
I am using DB2 Databases, is Toplink supporting these DBMS?

You're right about Spring. But it includes features for using ORM much comfortable.


Yes, like most ORM's TopLink also supports DB2.

Another question is why didn't you include JPA?

JPA is the standard for persistence in JEE and allows you to try different products out. I would recommend that.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My vote is for iBatis.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use Hibernate with JPA annotations.

Mapping one Java class across multiple tables is a lead pipe cinch. No problem at all. For multiple databases, you can use Hibernate Shards.

All the key frameworks work pretty good. Hibernate with JPA annotations is extremely easy, can work with an EntityManager, and has a very large basis of support.

It's a pretty personal decision though.

-Cameron McKenzie
 
Joe Harry
Ranch Hand
Posts: 10047
3
Eclipse IDE Mac PPC Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd prefer Hibernate/JPA.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since your application is going to support Java 5 and EJB 3, I think JPA is a clear winner.
iBatis is also a good candidate.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Antonio,

I'm just finishing up a book on Hibernate and JPA annotations. If you chose that direction, and you'd like a draft copy and be an editor, I'd more than welcome the help.

-Cameron McKenzie
 
antonio bartulovic
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why not
just send it to me!

because i'm writing actually a genreal overview of just 3 technonolgys:

raw jdbc vs. or mapping (hibernate and purequery)

abartulovic@gmail.com

I'm also able to translate it into german
[ February 27, 2008: Message edited by: antonio bartulovic ]
 
James Sutherland
Ranch Hand
Posts: 553
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Personally I would also recommend using JPA, as it has the most persistence products supporting it. Since JPA is just a spec, you will also need to decide on which JPA product to use, but the advantage of using the spec is that you can easily switch what product you use at any point.

Here is a link to a short list of JPA and persistence products,
http://en.wikibooks.org/wiki/Java_Persistence/Persistence_Products

In my extraordinary biased opinion I would recommend EclipseLink.
 
Pj Murray
Ranch Hand
Posts: 194
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some items that might help

There's a blog posting with a comparison of Java persistence choices here:

http://www.codefutures.com/weblog/corporate/archives/2005/02/data_persistenc.html

Of course, you need to decide if you really want to use a mapping tool. You may find these blog postings on "DAO versus ORM" and "Choosing a Java persistence strategy" interesting:

http://www.codefutures.com/weblog/andygrove/archives/2005/02/data_access_obj.html


http://www.codefutures.com/weblog/andygrove/archives/2005/01/choosing_a_java.html


 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic