Hi devs.
I would like to propose:
1. Make all xwiki stores as components.
So they will be constructed via our ComponentManager.
2. Deprecate all store public constructors.
Because they are useless for components.
3. Add SessionFactory component to all hibernate stores.
this will fix XWIKI-2332: Share one session factory among all hibernate
stores.
move all hibernate configuration to SessionFactory component.
one SessionFactory is shared by all stores by default (configured in
components.xml).
here is tentative interface SessionFactory {
Session openSession()
Configuration getConfiguration()
/** rebuild session factory with new configuration. needed for inject
hibernate custom mappings. */
void updateConfiguration(Configuration cfg)
}
4. Add QueryManager component to main store (XWikiStoreInterface)
WDYT?
--
Artem Melentyev