Jun 6th, 2006, 09:04 AM
AbstractTransactionalDataSourceSpringContextTests and multiple SessionFactories
I'm using the spring class AbstractTransactionalDataSourceSpringContextTests, but since I have defined two SessionFactories and two DataSources (I have to connect to two different Databases), the spring container can't auto-wiring the beans by type.
"No problem", I thought: just wire them manually. But I can't set a DataSource on the SessionFactory. And when I cast the SessionFactory to a LocalSessionFactoryBean, my DAO class doesn't accept it because it's based on the spring class HibernateDaoSupport which needs a SessionFactory.
How can I wire these classes?
Thanks for your help