sling-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David G." <davidjgonza...@gmail.com>
Subject Re: sling:OsgiConfig - Setting multi-values
Date Tue, 14 Feb 2012 16:41:15 GMT
Justin,

if merely have a property on my osgi config node, no properties are
loaded for the service for "path".

    path => ["/foo", "/bar"]

only when I add

    path.0 => "any-value"

does the "path" array take effect. From your confusion, i assume that
path => ["/foo", "/bar"] should suffice.

Thanks



On Mon, Feb 13, 2012 at 10:37 AM, Justin Edelson
<justin@justinedelson.com> wrote:
> David-
> JCR Install does not support combining configuration nodes, so these
> configurations are essentially overwriting each other.
>
> So yes, if you are going to use JCR Install you need to configure this
> list in a central location.
>
> I don't understand your second issue. What happens when you just have
> a single multi-valued property named path?
>
> Justin
>
> On Mon, Feb 13, 2012 at 10:00 AM, David G. <davidjgonzalez@gmail.com> wrote:
>> I am trying to set multi-value properties for Sling Services. I have
>> N web sites, and each web site needs to specificy a set of values, and
>> ultimately I need the union of these values to be applied to the
>> service. I would like to use sling:OsgiConfig nodes to specify these
>> values, so they can be easily persisted across servers.
>>
>> For example:
>>
>> /apps/site1/config/com.some.serviceImpl
>> -       path = [“/site1”, “/siteOne”]
>>
>> /apps/site2/config/com.some.serviceImpl
>> -       path = [“/site2”, “/siteTwo”]
>>
>> /apps/site3/config/com.some.serviceImpl
>> -       path = [“/site3”, “/siteThree”, “/vanity”]
>>
>>
>> When all three sites are deployed the Sling Config Mgr would list out:
>>
>> -       /site1
>> -       /siteOne
>> -       /site2
>> -       /siteTwo
>> -       /site3
>> -       /siteThree
>> -       /vanity
>>
>> Is this possible? Or would I have to make a “common” apps where these
>> “shared” service configs are stored.
>>
>> Also,  the only way I was able to set even 1 set of multi value
>> properties for a sling service on a sling:OsgiConfig node was
>>
>> /apps/test/config/com.some.serviceImpl
>> -       path = [“foo”, “bar”]
>> -       path.0 = “ignore-me”
>> -
>> Is there a more proper way to do this?

Mime
View raw message