On 05/21/2012 02:16 AM, CHENEAU-GREHALLE Nicolas wrote:
Hi,
Thank you for the help.
I checked the xwiki.cfg (release 4.0): the property "xwiki.work.dir" is not
commented as deprecated.
True, the two settings (in xwiki.cfg and in xwiki.properties) co-existed
for some time, and different modules were gradually updated to use the
new setting instead of the old one. I just looked at all the code and it
seems that the old setting is still used by the Lucene plugin. After
fixing that one, it would be possible to fully deprecate the old setting.
-----Message d'origine-----
De : users-bounces(a)xwiki.org [mailto:users-bounces@xwiki.org] De la part de Sergiu
Dumitriu
Envoyé : jeudi 17 mai 2012 04:45
À : XWiki Users
Objet : Re: [xwiki-users] Bug with file storage ?
On 05/16/2012 10:23 AM, CHENEAU-GREHALLE Nicolas wrote:
Hi,
Because of memory problems with our (small) server, I've decided to
switch from hibernate storage to file storage for attachments.
When I launch the filesystemAttachmentPorterScript-2.0.xwiki20 groovy
script, the script prints :
"This is your storage directory, when filesystem attachments are enabled
you have to back this up as part of your data backup routine.
/usr/apache-tomcat-5.5.25/logs/data/storage"
The value is the result of
"Utils.getComponent(FilesystemStoreTools.class).storageDir.getAbsolutePa
th()" command (tomcat was started from logs directory).
The xwiki doc says :
"The directory in which the attachments are stored in the filesystem is
defined with the parameter xwiki.work.dir in the xwiki.cfg file. "
But the value in my xwiki.cfg is :
xwiki.work.dir=/usr/apache-tomcat-5.5.25/webapps/xem/work
If I try the command below in a groovy script, the value is what I want,
but not the value
"Utils.getComponent(FilesystemStoreTools.class).storageDir.getAbsolutePa
th()" prints :
xwiki.getXWiki().getConfig().getProperty('xwiki.work.dir') =>
/usr/apache-tomcat-5.5.25/webapps/xem/work
It seems to me that the value of xwiki.work.dir is not used, only the
default value.
That's a bug ?
Not really. xwiki.work.dir is deprecated, and the configuration since
XWiki 3.5 is taken from the "environment.permanentDirectory" setting in
xwiki.properties. I updated
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments with the
new way to configure this.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/