I doubt you'll get an answer to this question.. I think Hibernate still does not have a suitable solution for this scenario.
With such a large number of tables, it would seem unlikely that a new Session Factory object per database would be appropriate. However, if you pass a connection object or parameter, as you point out, you will lose isolation in the 2nd level cache.
In our situation, one session factory is equally inappropriate. We have a smaller number of tables (only 400) but a large number of databases (2000 and climbing).
I believe we could use hibernate but in its current form, I think we would suffer on flexibility, scalability and performance by doing so.
M.
|