Feras Odeh
Feras Odeh

Reputation: 9296

How to integrate Spring ,JSF and hibernate

I'm trying to integrate spring with jsf portlet that uses hibernate.I just want to use spring DAO to get the best of spring transaction management.

How could I do this in a simple way?

It's worth to mention that I'm using ant.

Thanks

Upvotes: 1

Views: 956

Answers (1)

Bozho
Bozho

Reputation: 597016

Spring and hibernate are integrated automatically - spring provides enough on that part. Perhaps you can use the EntityManager (annotated with @PersistenceContext) instead of HibernateTemplate.

The JSF integration is done via registering a special ELResolver that resolves managed beans from the spring context.

An example how to do all this can be found here - checkout the project and see how it is configured.

Upvotes: 3

Related Questions