I was reading about Hibernate but have never used it for persistence. One think i found difficult to understand is why will anyone use Hibernate if they have a option of using a CMP Entity beans.
Any thoughts around this are welcome ?
-
Hibernate or CMP (4 messages)
- Posted by: Neeraj Gogia
- Posted on: August 11 2004 11:28 EDT
Threaded Messages (4)
- Hibernate or CMP by Ken Egervari on August 11 2004 13:31 EDT
- Hibernate or CMP by Matthew Kull on August 11 2004 14:05 EDT
- Hibernate or CMP by Hani Naguib on January 22 2005 21:17 EST
- No one is discussing the subject every one is wandering by Uday Thakare on May 09 2007 00:44 EDT
-
Hibernate or CMP[ Go to top ]
- Posted by: Ken Egervari
- Posted on: August 11 2004 13:31 EDT
- in response to Neeraj Gogia
because cmp is crap -
Hibernate or CMP[ Go to top ]
- Posted by: Matthew Kull
- Posted on: August 11 2004 14:05 EDT
- in response to Neeraj Gogia
Hibernate is smaller, lighter, and easier to use compared to the EJB mega-frameworks.
Hibernate is transparent, in that your model contains no persistence code of any kind. All you need is to provide a default, parameterless constructor.
Another advantage to hibernate is that it only deals with JDBC, allowing it to use a very SQL like query language.
For more information, a great book on Hibernate and other ejb alternatives is "Better, Faster, Lighter Java," by Bruce Tate and Justin Gehtland
Hibernate vs Toplink vs CMP : http://www.theserverside.com/discussions/thread.tss?thread_id=27037
Spring/Hibernate vs J2EE / EJB :
http://www.theserverside.com/discussions/thread.tss?thread_id=27693 -
Hibernate or CMP[ Go to top ]
- Posted by: Hani Naguib
- Posted on: January 22 2005 21:17 EST
- in response to Neeraj Gogia
Your question should have read: "Why will anyone use CMP Entity Beans if they have the option of using Hibernate."
But seriously, here are a few reasons:
1- Hibernate is more powerful.
You can express many things with Hibernate that cannot be done with CMPs (At least without resorting to Server specific functions, which would make your app less portable). Things like ordering of results, placing limits/offset on the data you require (usefull for paging). Dynamic queries etc.
2- Hibernate uses POJOs.
This brings many benefits, such as the ability to run outside of a J2EE app server. (For example I can run junit tests on my DAO layer during my build cycle.
3- Performance
4- Easy of use -
No one is discussing the subject every one is wandering[ Go to top ]
- Posted by: Uday Thakare
- Posted on: May 09 2007 00:44 EDT
- in response to Neeraj Gogia
Let me tell you what I know is,If there is any wrong conception, Please tell me at uday_thakare1981 at yahoo dot comHibernate is more usefull than ejb b'coz it is simple, no need to create a structure There is less database connectivity code Easier to use when your database is varring that is for extensibity It uses cashing so less database transaction