Is it possible to use Spring Data JPA (backed by Hibernate as JPA provider) and directly use Hibernate at the same time?
The problem is that when i use JpaTransactionMan
You need a single way of configuration you are now configuring both Hibernate and JPA. You should be using JPA for configuration so remove the hibernate setup.
You are using Hibernate4 so you can take advantage of the, not so well known, HibernateJpaSessionFactoryBean
of Spring. If you need access to the SessionFactory
(which I assume you need).
When applied your configuration will like something like this.
I would suggest to only use this as an intermediate solution while you are refactoring your applicaiton to use the plain JPA api. I wouldn't suggest mixing both strategies.