It's not a secret anymore!*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes ORM ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "ORM ?" Watch "ORM ?" New topic
Author

ORM ?

Sai Swami
Ranch Hand

Joined: Sep 24, 2002
Posts: 51
Hi Ranchers !

Can anyone tell me which ORM we need to study ( or maybe what we need to study for object-relational tools) for SCEA part - I ?


Thanks in advance,
Sai
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
No need.

Just study high-level concepts of EJB 3.0.


SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Benoît de Chateauvieux
Ranch Hand

Joined: Aug 10, 2007
Posts: 183
Hi Sai,

I think that, in the scope of SCEA, you need to focus on JPA (Java Persistence APA, a specification, part of EJB 3.0).
The implementations of this specification are Hibernate, Toplink, Kodo, etc... and you don't need to study them in details.

They are alternatives (or extensions) to JPA, and as a Java Architect, you must know that they exist.

Beno�t
[ December 11, 2008: Message edited by: Beno�t de CHATEAUVIEUX ]

SCJP5 | SCBCD5 | SCEA5 Part 1
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
I don't get why people keep saying Hibernate is an implementation of JPA which is incorrect.

"The Java Persistence API draws upon the best ideas from persistence technologies such as Hibernate, TopLink, and JDO."
"The Java Persistence API is not based on any single existing persistence framework but incorporates--and improves upon--ideas contributed by many popular frameworks, including Hibernate, TopLink, JDO, and others."
http://java.sun.com/javaee/overview/faq/persistence.jsp

Hibernate, TopLink, JDO *are not* implementations of JPA, but JPA was created based on them.

Hibernate, TopLink have their own interfaces/API, they implement their own API, they exist before JPA, how come they are implementations of JPA?
[ December 11, 2008: Message edited by: Kengkaj Sathianpantarit ]
Benoît de Chateauvieux
Ranch Hand

Joined: Aug 10, 2007
Posts: 183
Hi Kengkaj,

You are right: JPA is based on the experience of the first ORM projects (like Hibernate, which appeared years before JPA).

But as JPA provides only interfaces and Hibernate provides the classes, Hibernate (and Toplink, Kodo, etc.) are implementations of JPA.

Hibernates is a standalone ORM framework too, and has powerful functionalities that are not part of the JPA specification.

Here is an excerpt of the Hibernate website (http://www.hibernate.org/397.html):

Java Persistence with Hibernate

The Java Persistence API is the standard object/relational mapping and persistence management interface of the Java EE 5.0 platform. As part of the EJB 3.0 specification effort, it is supported by all major vendors of the Java industry.

Hibernate implements the Java Persistence object/relational mapping and persistence management interfaces with the Hibernate Annotations and Hibernate EntityManager modules, on top of the mature and powerful Hibernate Core.


Beno�t
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
Thanks for information, Beno�t.

Actually, you should bold entire paragraph to make it more clear.
Hibernate implements the Java Persistence object/relational mapping and persistence management interfaces with the Hibernate Annotations and Hibernate EntityManager modules, on top of the mature and powerful Hibernate Core.


This sentence doesn't state that Hibernate as a whole is an implementation of JPA.

But currently, Hibernate has more components to make it conform with JPA, say Hibernate Annotations and Hibernate Entity Manager.

Hibernate Entity Manager is actually just a wrapper to Hibernate Core.
"Hibernate EntityManager wraps the powerful and mature Hibernate Core. You can fall back to Hibernate native APIs, native SQL, and native JDBC whenever necessary."
http://www.hibernate.org/397.html

In other word, it's just an implementation of Adapter pattern to allow clients to use JPA with Hibernate.

So, in my opinion, Hibernate as a whole is not an implementation of JPA.

Hibernate Core has its own API, and Hibernate EntityManager (a module of Hibernate) implements JPA, and wraps Hibernate Core.

I totally agree, if we say Hibernate EntityManager is an implementation of JPA, or Hibernate EntityManager is a wrapper of Hibernate Core.

But I don't think it is right to say that, "Hibernate" is an implementation of JPA.

This may cause headache, because Hibernate was mature before JPA was adopted.

Another example to make my explanation more clear.
I think it's incorrect to say that JDK is an implementation of Collection Framework API, just because Java Collection Framework (a part of JDK) is an implementation of Collection Framework API.
[ December 12, 2008: Message edited by: Kengkaj Sathianpantarit ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ORM ?
 
Similar Threads
one -to -many
JDBC OR HIBERNATE ?
Thread Group
Android : What we need?
Database access