I already post similar question, but have no answer. :cry:
I am wondering how it might be possible to work with multiple databases at the same time with Hibernate and Spring? I have a scenario with multiple 5 different databases (Oracle on different platforms). AFAIK, this would require 5 SessionFactories(each one configured for respective database), then maintaining 5 Hibernate sessions in my application.
However, while each individual object can be guaranteed to be persisted in either one database or the other, the domain object model is split across 2 to 3 databases (part is data shared with legacy systems). This means we will be trying to load object **graphs** which span databases - The mappings dont allow objects to be mapped to Tables in different databases, and I can't readily see how we could do this directly in Hibernate. I think Spring will help, but don't know how.
We had Some discussion about possibly front-ending the databases with third party software, and this is an option but this has performance drawbacks in our specific case.
Has anybody acheived the same end result in some other way, or have any ideas, patterns or suggestions on how it might be possible (no matter how daft!)?