Sven
Sven

Reputation: 6338

Is Hibernate deprecated?

This morning I was aboard a S-Bahn (German Subway) and I met a fellow student, who works for IBM. What he is doing there is Java EE optimization. I told him about my little project. And he recommended not to use 'oldschool' Hibernate. That's why my question is:

Is Hibernate deprecated? (In combination with Java EE/Web Development)

..or did he just prate..

Upvotes: 18

Views: 6270

Answers (7)

Manius
Manius

Reputation: 3644

Based on what you said, it sounds like he may have been referring to Hibernate xml mappings, in contrast to using Hibernate annotations or JPA. XML is most certainly old-school rubbish.

Upvotes: 2

Adrian Shum
Adrian Shum

Reputation: 40036

Hibernate, apart from being an implementation of JPA, does provide a lot of extra advanced feature that JPA lacks of (extra syntax in query, QBC support etc). Some of them are really useful and hard to find a workaround in JPA world (yet). Without providing such features, it is hard to say JPA can "replace" Hibernate (hence, saying Hibernate being deprecating)

Upvotes: 4

anirvan
anirvan

Reputation: 4877

One possible reason why he may have suggested you against Hibernate is that for a small project, the overhead of understanding Hibernate can be quite significant.

Hibernate is vast to say the least. Though it can be used in a simple way, but to find that out too, you'll need to comprehend a whole lot more.

but be rest assured that Hibernate is NOT deprecated, or going to be any time in the distant future. it's just that if your ORM needs are modest, you might want to try other solutions like iBATIS

Upvotes: 2

Petar Minchev
Petar Minchev

Reputation: 47373

No, there is no way that Hibernate is deprecated. There is the JPA which is a persistence specification and Hibernate implements it. Also Hibernate has its own advanced features that JPA does not have and that's why Hibernate is the main source of new features that are added to the JPA standard.

Upvotes: 2

Robert Munteanu
Robert Munteanu

Reputation: 68278

Hibernate is the JPA provider offered by JBoss, which is a Java EE server, so I doubt that Hibernate as an implementation is deprecated.

Perhaps he meant that using Hibernate within a Java EE server , bypassing the container-provider persistence, is deprecated and you should rely on our container for such services.

Upvotes: 3

Jesper
Jesper

Reputation: 206846

No, Hibernate is not deprecated.

However, there's now JPA (Java Persistence API), which is a standard API for doing the things that Hibernate does.

Note that JPA is just an interface specification. You'll need something that implements JPA, and Hibernate is one of the implementations of JPA. Besides Hibernate, there are a few others such as EclipseLink (the official reference implementation for JPA) and Apache OpenJPA.

Upvotes: 29

Konrad Garus
Konrad Garus

Reputation: 54025

JPA is only one way to do it. There's still Spring and all the other frameworks where Hibernate is well alive.

Upvotes: 1

Related Questions