On Tue, May 8, 2012 at 3:02 PM, Marius Dumitru Florea
<mariusdumitru.flo...@xwiki.com> wrote:
> On Tue, May 8, 2012 at 2:11 PM, mohit gupta <motgu...@gmail.com> wrote:
>> Whenever i add a new property in xwiki.cfg file, to refer that property in
>> my java code, i need tomcat server restart otherwise that property is not
>> visible.
>
>> Is there a api/configuration can refer the newly added property  in
>> xwiki.cfg file without server restart?
>
> I don't think there is, but..
>
>> Here is how i get the newly added
>> property from xwiki.cfg file
>>
>> String
>> adminData=xwikiContext.getWiki().getConfig().getProperty("adminData");
>
> ..you shouldn't use xwiki.cfg because it was deprecated in favour of
> xwiki.properties and, more important, you should use the Configuration
> Source [1] to decouple your code from the place where the
> configuration is stored (xwiki.properties, wiki preferences, space
> preferences, user preferences, etc.).
>
> Hope this helps,
> Marius

[1] http://extensions.xwiki.org/xwiki/bin/view/Extension/Configuration+Module

>
>>
>> Thanks.
>> _______________________________________________
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to