Hibernate cannot do that. It would have to dig deeply into each database's transaction engine to get a two-phase commit working, and that's simply outside of Hibernate's scope.
However, I think there are solutions outside Hibernate itself. One way would be to check if your database offers a way to include tables from external databases (possibly even from a different vendor) in their catalog. For example, Oracle has a "database link" feature that does that. I dimly remember that I stumbled upon some middleware that does similar things when I was researching connection pooling modules. It was one of those four-letter acronyms that I keep forgetting, so maybe somebody else can pick up.
|