Mira
Mira

Reputation: 291

If using EJB3 JPA , do I need hibernate?

I know that JPA is just a standard and to use it you need an implementation such as Hibernate3.2 , My question is : does EJB3 come with an implementation of JPA or I still need implementation such as hibernate to use besides EJB3 ? If you can point me to any useful tutorial on this it will be great :)

Thanks

Upvotes: 1

Views: 1850

Answers (3)

Anton
Anton

Reputation: 6061

It depends on the Java EE container specific implementation. JPA is more like an interface, specification, and Hibernate is a custom JPA implementation.

Hibernate comes on board with JBoss, Eclipselink is an example of another JPA implementation which comes with Glassfish. But you can still use Hibernate + Glassfish, if you want.

Upvotes: 1

Amir Pashazadeh
Amir Pashazadeh

Reputation: 7322

If you are using Hibernate features such as @Filter then you shall use Hibernate as your JPA provider. Some application servers (such as JBoss) use Hibernate as their JPA provider.

Upvotes: 1

Tomasz Nurkiewicz
Tomasz Nurkiewicz

Reputation: 340963

If the container supports JPA, it gives you an API (EntityManager and others), you don't care what implements it. So no, you don't have to use Hibernate. Some containers will use Hibernate underneath, other EclipseLink, etc. But from your perspective you are using an API that just works.

Upvotes: 3

Related Questions