Problem:
We have multiple datasources all sharing the same schema and domain model.
We are using multiple session factories currently deployed as separate MBeans in JBoss.
The use case is that a user may select the specific datasource subject matter to work with, blah, blah, blah...
However, although this works, looking a little deeper it would seem wiser to pass in connection information to a single session factory since all the databases share the same schema, eliminating the need to manage multiple session factories.
Questions:
1. Does this approach seem reasonable?
2. What are the implications (2nd level cache, etc.)?
3. Anyone have experience doing this with JBoss (i.e. How to configure SAR)?
|