wht is the difference between hibernate and EJB 3.0

What are the main features differences in Hibernate and EJB3.0. What one should we prefer to use. Can some one provide me links to work and learn on these two technologies in depth.
[188 byte] By [ravikiran_ca] at [2007-10-2 8:36:06]
# 1

EJB 3.0 is a standard; Hibernate is not.

EJB 3.0 uses entity beans for persistence; Hibernate uses object-relational mapping.

You cannot use EJB 3.0 without a JEE container; you can use Hibernate without a JEE container.

EJB 3.0 requires EJBs; Hibernate is POJO persistence.

http://www.hibernate.org

http://www.javaworld.com/javaworld/jw-08-2004/jw-0809-ejb.html

Is Google not installed on your machine?

%

duffymoa at 2007-7-16 22:37:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
I want to know people views and ideas. I need more replies. And I am expecting people to speak more abt it
ravikiran_ca at 2007-7-16 22:37:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Your question is too broad, and as duffymo hinted, a quick google search can provide a whole mess of information in that broad category.

ie try [url http://www.google.com/search?hl=en&q=hibernate+vs+EJB&meta=

]this one [/url]

From what I understand hibernate is a lot simpler to use than EJB, and has been recommended by people on this forum I respect, but thats about the sum of my knowledge.

evnafetsa at 2007-7-16 22:37:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

For me the simple fact that you can acheive similar results with the two, and Hibernate does not require a full J2EE container makes it more appealling for me. I am a Tomcat junky. I even spread a little Tomcat on my cereal in the morning...

However, if I used EJBs (which to date I have not, although if I were being totally honest with myself Message Driven Beans should be in my toolkit already) I would probably go ahead and learn EJB 3.0. From what I have read and understand it is a significant improvement over 2.0.

linxpdaa at 2007-7-16 22:37:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

> For me the simple fact that you can acheive similar

> results with the two, and Hibernate does not require

> a full J2EE container makes it more appealling for

> me. I am a Tomcat junky. I even spread a little

> Tomcat on my cereal in the morning...

Right. The point is that you can do JEE without EJBs.

>

> However, if I used EJBs (which to date I have not,

> although if I were being totally honest with myself

> Message Driven Beans should be in my toolkit already)

> I would probably go ahead and learn EJB 3.0. From

> what I have read and understand it is a significant

> improvement over 2.0.

I would never discourage anyone from learning new things, but you can do asynchronous processing with JMS, without using MDBs.

I helped develop an application recently that was deployed on WebLogic 8.1. We used it for connection pooling and JMS queue setup, but there wasn't a single EJB in the app. It was all Spring and Hibernate. Delivered on time, great performance, no defects in the production instance that's running today. Nice stuff.

%

duffymoa at 2007-7-16 22:37:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
In order to maintain persistence data we are using entity-beans in application server which has EJB_Container.But by using HIBERNATE we need not to have EJB_Container and we using Plain Old Java Objects(POJO) by using two mapping files called hibernate-mapping.xml,hibernate-config.xml.
venkatlovesalla at 2007-7-16 22:37:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7

From what I understand EJB3 is more of a specification that provides the Java Persistence API and leaves the method to implement persistence to the individual vendors. Hibernate 3 provides an implementation for this persistence using its O/R mapping that confirms to the EJB3 specification.

Message was edited by:

Abhishekh

Abhishekha at 2007-7-16 22:37:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 8

EJB 3.0 is a specification, not an implementation. This means that multiple vendors may provide different implementations of the same specification, thereby allowing portability and vendor independence and encouraging continued innovation through compitition. Hibernate is an open source product with its own API that is independent of both EJB3.0 and JDO specifications.

venkat_thumua at 2007-7-16 22:37:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 9

Hello all,

Apart from what we are discussing above there is one more intresting feature which allows to work with any database without modifying the code, this is becuase of hibernate layer in application. Hibernate sits in between you application's logic and database, and you access your database with the help of objects (POJO) and write the data accesing queries in Object form(HQL - Hibernate Query Language) which is indepened of all database. whenever you want to chage your backed database just change the configuration files(hibernate.cfg.xml) and you are done. Isnt is cool feature, you dont need to worry about the underlying database.

Surya

--Idea's can change everything

Surya_INDa at 2007-7-16 22:37:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 10
Though hibernate supports database independence, In reality... how far is it useful you have to think, once the database is decided for an application, In very cases they may change the DB. Have to think on this,Regards,Ravindra kumar Vangapalli.
ravindra4mea at 2007-7-16 22:37:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...