dukable
dukable

Reputation: 4048

Hibernate integration on a Spring web application

I have been following this tutorial on the Springsource website in order to have basic knowledge of Spring. Everything went good.

Now, I would like to integrate Hibernate to this little application I wrote following this tutorial. I found documentation on different websites (including hibernate's website) but I still have a few questions before starting.

I read some stuff about JPA and I can use it as an abstraction layer on top of hibernate but I don't really understand what for.

In addition, I read somewhere that there is two ways to use hibernate, the first one is annotations and the second one is using javax.persistance, I am right?

Is there some recent documentation about how to use hibernate in an existing spring web application, as well as the different ways to implement it?

Upvotes: 1

Views: 1295

Answers (2)

Chandana
Chandana

Reputation: 2638

JPA is a specification, hibernate can be considered as a implementation of the JPA spec.

You can use either annotation for mapping file with hibernate.

The following tutorials are better:

Hibernate Tutorial Vaannila

Hibernate Tutorial Mkyong

Upvotes: 2

Dave Newton
Dave Newton

Reputation: 160191

JPA is a standard, Hibernate is an implementation, but has other/additional functionality.

The Spring Reference manual's section on ORM integration covers Hibernate. There are also scores of tutorials and demos, like here, but there are a bunch of other ones, and more recent ones.

Upvotes: 1

Related Questions