Hibernate Vs EJB

Advantages:
- Hibernate Beans are easier to implement since you don’t need any interface coding.
- Queries can be dynamic and perform faster (at least on WebLogic and JBoss)
- Hibernate offers a more object-oriented approach. You can map is-a relationships as subclasses.
- For data transfer you can use Hibernate Beans as DTOs if you want (and if it’s applicable). You can even fill ‘custom’ DTOs with query results just with one line of code using the select-new construct.

Disadvantages:
- Hibernate Beans are not automatically ‘locked’ for others while used during a transaction. This can lead to inconsistent data when more clients concurrently modify the same data.
-Object Pooling is an Issue

Written by Ravi Nallakukkala on March 25th, 2007 with no comments.
Read more articles on Hibernate and Java/ J2EE.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> .