In Hibernate there's a one to one relation between a SessionFactory and a JDBC DataSource. All the nice ORM features are available within the scope of one SessionFactory only. (i.e. relations accros SessionFactoryies are not handled by Hibernate).
If you want to use Hibernate in your scenario you have to make it transparent. I didn't think about it in detail, maybe the follwing thoughts may give you a start:
- Have different SessionFactories and deal with this fact in a DAO layer in order you busniess logic dosn't know about it.
- Consider using an J2EE AppServer or something like http://c-jdbc.objectweb.org/ in order to make your clustering completely transparent to Hibernate.
HTH
Ernst