• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

ORM ?

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No need.

Just study high-level concepts of EJB 3.0.
 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic