I have a hibernate.cfg.xml file, but I'd like to reference it as a dataSource bean. Is there any way to do this? All I have is :
<beans:bean id="foo" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<beans:property name="configLocation" value="classpath:hibernate.cfg.xml"/>
but its not a dataSource. Any help would be greatly appreciated.
To add a bit of context, I'd like to integrate Spring Security in my app and one of the ways to provide a database as a source for the authentication manager is as follows (taken from here):
<authentication-manager>
<authentication-provider>
<jdbc-user-service data-source-ref="securityDataSource"/>
</authentication-provider>
</authentication-manager>
Where “securityDataSource” is the name of a DataSource bean in the application context, pointing at a database.