-
Jun 6th, 2006, 09:04 AM
#1
AbstractTransactionalDataSourceSpringContextTests and multiple SessionFactories
Hi all
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
Stefan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules