Hi Josh,
On Tue, Sep 1, 2009 at 7:54 PM, Josh Kennedy<[email protected]> wrote:
> ...I figured out that once the repository was created that it ignored
> configuration changes, needless to say I have deleted the sling home many
> times.  Where will it actually look for the configuration file?  Will it
> scan the contents of the war for it, or is it expecting it to be on the
> local filesystem?...

The first time the embedded repository starts, it looks for a
configuration file specified by the sling.repository.config.file.url
property.

If that file doesn't exist, the bundle's Activator [1] getConfigFile()
method copies a default repository.xml file supplied by the bundle to
the repository's home directory, and sets the corresponding OSGi
configuration parameter to point to that file.

The OSGi configurations themselves are stored under in the config
subfolder of the sling home folder. Deleting this before restarting
Sling will cause all OSGi configs to return to their default values.

Hope this helps,
-Bertrand

[1] 
http://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/Activator.java



>
> On Aug 31, 2009, at 11:55 PM, Bertrand Delacretaz wrote:
>
>> Hi Josh,
>>
>> On Mon, Aug 31, 2009 at 10:36 PM, Josh Kennedy<[email protected]> wrote:
>>>
>>> On Aug 26, 2009, at 5:33 AM, Bertrand Delacretaz wrote:
>>>>
>>>> ...The changes of https://issues.apache.org/jira/browse/SLING-739 should
>>>> help,...
>>
>>> ...I set 'sling.repository.config.file.url' to an HTTP URL in the
>>> init-params
>>> of the web.xml to no avail.  I am setting the sling.home in the web.xml
>>> and
>>> that works.  I have a sling.properties file in WEB-INF in the war with
>>> the
>>> same URL for 'sling.repository.config.file.url' set and it still didn't
>>> fetch the config.  I've also tried specifing a file name and placing it
>>> in
>>> various locations within the war (root, WEB-INF, WEB-INF/classes)  and it
>>> was never used for jackrabbit....
>>
>> I played a bit with this and the use of this property can be confusing
>> - I have just added some notes to SLING-739 with the details.
>>
>> Also added log messages to indicate which config file is actually used
>> ("org.apache.sling.jcr.jackrabbit.server Using configuration..."), in
>> revision 809855.
>>
>> For now, for the property to be used, it needs to be correct the first
>> time Sling starts, i.e. before the OSGi repository configuration is
>> created. We might want to improve this.
>>
>> -Bertrand
>
>

Reply via email to