I had to count the number of connections to the database needed by XWiki to
set the appropriate number in the DB configuration.
I saw (
http://jira.xwiki.org/jira/browse/XWIKI-2332 ) that there is one
session factory for every Hibernate Store. After a quick look on the web I
understood that a session factory provides one session at a time (basically:
if the session is open, then re-use the same session), and the session owns
the connexions pool, set to 1 by hibernate.cfg.xml. So I assume I should
have one opened connexion for every Hibernate store.
According to the initXWiki method from the com.xpn.xwiki.XWiki class, there
is 7 stores :
- Main store
- Attachments store
- Versioning store
- Attachment versioning store
- Recycle bin store
- Attachments recycle bin store
- Migration store (updating the database after XWiki update).
So my question is : Am I right ? Are 7 connexions really enough ? It seems
to work, although I didn't tested everything more than seeing pages. Any
answer from someone having a better knowledge of XWiki's internal
functionment and/or Hibernate would be welcome.
All that waiting for the 1.5 version which should allow a shared factory
between every store...
Thanks a lot,
Sebastien Fieux