Example & Tutorial understanding programming in easy ways.

What is the difference between beans and Hibernate?

The difference between EJB and Hibernate are as below:


1. In hibernate, Hibernate defines the HQL for expressing queries to the database. Whenever EJB defines QL for expressing queries.

2. In EJB at a time we can interact with only one database where as in hibernate we can able to establishes the connections to more than one database. Only thing we need to write one more configuration file.

3. EJB need container like weblogic, websphare but hibernate don't need. It can be run on tomcat.

4. EJB does not support OOPS concept where as Hibernate does.

5. In Hibernate C3P0 can be used as a connection pool.

6. Hibernate is container independent. EJB not.

Read More →