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.
- [+] Digg: Feature this article
- [+] Del.icio.us: Bookmark this article
- [+] Furl: Bookmark this article