Hibernate version: 3.1.2
Hi,
My non-managed application needs to access two databases simultaneously. I've set up two threads, one for each database target, with separate Hibernate configurations and SessionFactory instances.
Upon startup, the two Configuration instances overlap nicely with no serious time penalty. However, the two SessionFactory instances seem to block each other -- the startup time for both SessionFactory.buildSessionFactory() calls in two threads is nearly the same as when it's all in one thread.
Is this expected behavior? Can I get two SessionFactory instances built without paying the startup time penalty twice?
Thanks!
|