G
gilgantic
When is it better to use Hibernate versus EJB or JDBC? Are there times
we would use JDBC or EJB, and not Hibernate?
I know Hibernate models the architecture of EJB 3.0. What I have
discovered so far is
Advantages of Hibernate over EJB and/or JDBC
==================================
* Entity Beans have to follow naming conventions, POJOs can be any Java
object at all in Hibernate.
* Less code in Hibernate than JDBC
* CMP Entity Beans require a one-to-one mapping to database tables.
* EJB are (by reputation at least) slow.
* Someone has to determine which bean field maps to which table column
in EJB.
* EJB require special method names. If these are not followed
correctly, they will fail silently.
* Entity Beans have to reside within a J2EE application server
environment-they are a heavyweight solution.
* EJB cannot readily be extracted as "general purpose" components for
other applications.
* EJB can't be serializable.
* EJB rarely exist as portable components to be dropped into a foreign
application-you generally have to roll your own EJB solution.
Any links to tutorial, white paper, etc is welcomed.
we would use JDBC or EJB, and not Hibernate?
I know Hibernate models the architecture of EJB 3.0. What I have
discovered so far is
Advantages of Hibernate over EJB and/or JDBC
==================================
* Entity Beans have to follow naming conventions, POJOs can be any Java
object at all in Hibernate.
* Less code in Hibernate than JDBC
* CMP Entity Beans require a one-to-one mapping to database tables.
* EJB are (by reputation at least) slow.
* Someone has to determine which bean field maps to which table column
in EJB.
* EJB require special method names. If these are not followed
correctly, they will fail silently.
* Entity Beans have to reside within a J2EE application server
environment-they are a heavyweight solution.
* EJB cannot readily be extracted as "general purpose" components for
other applications.
* EJB can't be serializable.
* EJB rarely exist as portable components to be dropped into a foreign
application-you generally have to roll your own EJB solution.
Any links to tutorial, white paper, etc is welcomed.