I need to add a new functionality to an existing Spring-Hibernate web application. I would like to use the annotation mapping this time. I don't know how to make this happen. In the old way, to build a Hibernate SessionFactory and makes it available as bean reference.I have the following in the applicationContent-hibernate.xml file:
To use annotation, I believe that I need to have the following instead:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
Do I need to have two session factories? Or, one can work with the other?
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">