2008/1/19, rssh <rssh@gradsoft.com.ua>:
On Fri, 18 Jan 2008 17:14:59 +0100, Thomas Mortagne wrote
2008/1/16, rssh <rssh@gradsoft.com.ua>:
On Wed, 16 Jan 2008 11:49:21 +0100, Thomas Mortagne wrote
2008/1/16, rssh <rssh@gradsoft.com.ua>:
> - hsqldb : > - virtual : change main wiki database name and correctly apply > prefix (could be usefull) > - non-virtual : updateSchipt is done in toto and retrieve/save > document in PUBLIC (not ok)
Are you running hsql in file or server mode ? (I try to reproduce error).
XWiki's default hsql mode which is file.
I've found the reason of failure: setDatabase was enabled only for virtual xwiki-s
Yes and just enable it in non-virtual mode will create lots of problems because if you do that you don't have non-virtual mode anymore :)
Ohh - let's I try to understand the situation without vicious circle in definitions.
Virtual mode - across all code we determinate, that we in virtual mode by isVirtual() (which return us parameter xwiki.virtual). setDatabase() can't change value of parameter 'xwiki.virtual', so: we can't say that we have non-virtual mode.
1. Are exists any concrete problems, which we can describe without references to 'virtual/non-virtual' models ? 2. I see, the maximum problem, what we can have -- is loading/store of scheme without previous call of setDatabase(). Are this problem really exists and where ?
isVirtual is just an information XWiki use to know if it's in virtual mode or not. If you allow setDatabase in non-virtual mode you will be "physically" in virtual mode. That means you can access any wiki in the same database just using context.setDatabase from Velocity. It's a big difference at least for security when you have more than one XE in the same database. Another thing is that setDatabase is called for each query and execute "SET SCHEMA" or anything else depends of database type and it will double queries in non-virtual mode to always switch from wiki "wikiname" to "wikiname". There is others ways to do what you want like calling setDatabase with a parameter "force" at database init for example only if "wiki.db" is set. I don't say virtual/non-virtual separation can't be removed but it's another subject and imply more than just "allows to configurate name of database schema".
patch is attached (tested with hsql in non-virtual mode in addition to oracle in virtual/unvirtual). I will attach one to jira thought few seconds.
P.S. also note, that exitsts hibernate property 'default_schema' which (when we change name) must not conflict with xwiki.db
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne