On Sep 13, 2011, at 12:58 PM, Eduard Moraru wrote:
Hi Thomas,
On Mon, Sep 12, 2011 at 4:47 PM, Thomas Mortagne
<thomas.mortagne(a)xwiki.com>wrote;wrote:
Ok new proposal:
* introduce ApplicationContext#getWorkDirectory
* introduce container.workDirectory in xwiki.properties
AFAIK, we were supposed to deprecate xwiki.properties and use xwiki.cfg
instead.
No that's not correct. xwiki.cfg is the old one. xwiki.properties is the new one :)
Thanks
-Vincent
I notice that nobody is saying anything so I`d like to
make it
clear for myself :) Which one is it, xwiki.properties or xwiki.cfg?
Thanks,
Eduard
> * for now keep same behavior as XWiki#getWorkDirectory: if
> container.workDirectory is not defined then fallback on
> getTemporaryDirectory()
>
> I would really like to start using the API and I don't really care how
> it's implemented at EM level as long as I get a persisting folder when
> I can write stuff. We can always add more fallbacks before
> getTemporaryDirectory() later.
>
> WDYT ?
>
> Here is my +1
>
> On Mon, Sep 12, 2011 at 12:59 PM, Thomas Mortagne
> <thomas.mortagne(a)xwiki.com> wrote:
>> I think I finally understand why XE has a hack to add
>>
>> xwiki.work.dir=work
>>
>> at the end the generated xwiki.cfg file. It just hope to be run in a
>> folder where it has the right to write and which is persisted between
>> restarts.
>>
>> Because if you don't set this then it will use
>> javax.servlet.context.tempdir which can be removed anytime...
>> So basically even XWiki#getWorkDirectory has no clue where to find a
>> proper work directory and it has to be explicitly specified.
>>
>> It was kind of OK for the Lucene index but seems pretty fuzzy for
>> filesystem attachments or extension manager local repository to me.
>>
>> So I guess we will have to really start defining something about work
> directory.
>>
>> On Mon, Sep 12, 2011 at 11:58 AM, Thomas Mortagne
>> <thomas.mortagne(a)xwiki.com> wrote:
>>> On Mon, Sep 12, 2011 at 11:53 AM, Thomas Mortagne
>>> <thomas.mortagne(a)xwiki.com> wrote:
>>>> Hi devs,
>>>>
>>>> Right now there is no way for a component to know where is the
>>>> standard work directory (the one used for Lucene or filesystem
>>>> attachments for example) so I would like to add an API to access it.
>>>>
>>>> That said I propose to add a
>>>>
>>>> File getWorkDirectory()
>>>>
>>>> in org.xwiki.container.ApplicationContext which will use
>>>> XWiki#getWorkDirectory() behind the scene probably for now.
>>>>
>>>> WDYT ?
>>>>
>>>> --
>>>> Thomas Mortagne