Hi Constantine,
For the case of Product and User (service & Dao) declared in 2 separate configuration files, I see a issue about separating theses 2 contexts
if they are part of the same Domain Model (or they will be part in future evolution):
user 1 <-- n products
While I do understand that you may see some benefits to include both Product-service and Product-Dao inside the same file, I would not separate the Product-Dao and the User-Dao if they are dependent each other at the Entity level. I mean if you cannot load into the context Product-context.xml without User-context.xml, there's no benefit to separate them.
But the case is also true to me if 2 different applications are using the same database schema for different use cases, I would not separate the persistence of each application if they are using the same domain model.
For example if we have a User-administration application and a Product-store application.
In this case, I would have a
- business-user-administration.xml : business classes for the user-admin application
- product-store.xml : business classes for the product store application
while having a single file persistence (of big grouping of entities) knowing User-administration and Product-store
are using all domain model objects in the persistence.
The issue I have (and it is not a minor one) is that any small application wanting to use a little part of the persistence layer (report-sells-of-the-day) will have to load in memory most (or all) the domain model. But this is more a "hibernate" issue, because the persistence entities are dependent at this level only.