Tuesday, August 14, 2012

Hibernate vs EJB 3.0



  • Hibernate 


  1. Session–Cache or collection of loaded objects relating to a single unit of work 
  2. XDoclet Annotations used to support Attribute Oriented Programming
  3. Defines HQL for expressing queries to the database 
  4. Supports Entity Relationships through mapping files and annotations in JavaDoc 
  5. Provides a Persistence Manager API exposed via the Session, Query, Criteria, and Transaction API 
  6. Provides callback support through lifecycle, interceptor, and validatable interfaces 
  7. Entity Relationships are unidirectional. Bidirectional relationships are implemented by two unidirectional relationships 




  • EJB 3.0 


  1. Persistence Context-Set of entities that can be managed by a given EntityManager is defined by a persistence unit 
  2. Java 5.0 Annotations used to support Attribute Oriented Programming 
  3. Defines EJB QL for expressing queries
  4. Support Entity Relationships through Java 5.0 annotations  
  5. Provides and Entity Manager Interface for managing CRUD operations for an Entity 
  6. Provides callback support through Entity Listener and Callback methods 
  7. Entity Relationships are bidirectional or unidirectional 


http://javapassions.blogspot.com/2010/01/hibernate-interview-questions.html

No comments:

Post a Comment