GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE
Go To First  |  Previous Question  |  Next Question 
 J2EE  |  Question 59 of 104    Print  
what is the difference between EJB3.0(CMP) and Hibernate

  
Total Answers and Comments: 4 Last Update: July 31, 2009     Asked by: VishwasGenius 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: VAMSI MOHAN
 
1. You can use Hibernate without a full J2EE Containter. But EJB couldn't.

2. Hibernate uses OR Mapping and POJO for persistance. But EJB uses entity beans for persistancy.

3. Hibernate facilitates to work with any Database without changing code. But in case of EJB, sometimes it may be required.

Above answer was rated as good by the following members:
nareshbabuv21
August 31, 2006 04:37:04   #1  
Preeti Yadav Member Since: April 2006   Contribution: 30    

RE: what is the difference between EJB3.0(CMP) and Hib...
HIBERNATE is an ORM ( Object-Relational-Mapping) technology. It is an Open-Source and free technology developed in SourceForge.net. Theoretically the EJB specification does not say anything about the method to be adopted in persisting objects for permanent storage and retrieval. It could be simple object serialization.EJB 3.0 has fully embraced Java Annotations introduced in JDK 5.0 and also simplifies the API for CMP entity beans by using Hibernate as the EJB 3.0 Java Persistence engine.
 
Is this answer useful? Yes | No
April 04, 2007 02:47:33   #2  
sony vgeorge        

RE: what is the difference between EJB3.0(CMP) and Hib...
In hibernate we have .hbm file where we do all the relational things for our application. Each and every pojo (plain java object) we have to specify one .hbm file. it should make some complication if it is a huge project.

In Ejb3.0 we avoid all the hbm file and had taken the approch of annotaion. so we can understand the concept of every pojo easily without refering any other configuration page (In hibernate we have to check .hbm file to know the relation).

 
Is this answer useful? Yes | No
August 31, 2007 22:29:30   #3  
VAMSI MOHAN        

RE: what is the difference between EJB3.0(CMP) and Hib...
1. You can use Hibernate without a full J2EE Containter. But EJB couldn't.



2. Hibernate uses OR Mapping and POJO for persistance. But EJB uses entity beans for persistancy.



3. Hibernate facilitates to work with any Database without changing code. But in case of EJB sometimes it may be required.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
July 31, 2009 03:22:27   #4  
krishna_ballabh Member Since: July 2009   Contribution: 2    

RE: what is the difference between EJB3.0(CMP) and Hibernate

EJB3.0 does provide the POJO features for ORM in JPA as well as all features of older version in other word we can say that Entity Bean is no longer in EJB to provide the same specification is providing the more strong technology called JPA (Java Persistence API). JPA is an ORM tool which has entity to relation binding like Hibernate with Annotation or with XML configuration. Its older feature like concurrency Transaction Security etc is same like earlier. It could be deployed on Application server web server and on Stand alone application as well with user controlled transition.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape