If same db server but a different schema, you could specify the [schema="xxxx"] attribute in .hbm.xml file. This is not very flexible but it will work.
I don't know what your database provides, but you might be able to unify the databases so that it looks like a single db. On DB2/400, we can create an Alias -- a pointer in one database that points to a table in another database (but must be on same database server).
Beyond these suggestions, you will probably need to create multiple .cfg.xml files, multiple SessionFactory object, etc. This has been discussed several times in this forum.
Good luck,
Curtis ...
_________________ ---- Don't forget to rate! ----
|