You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by "Robert A. Decker" <de...@robdecker.com> on 2012/10/05 11:04:05 UTC

multivalue in osgi config?

Hi,

I'm trying to get a multi value to work in an osgi config. 

I've tried various combinations of String[], String with brackets on the value, etc but nothing seems to work.

Is it possible to have multi value strings in my osgi config?

<node>
    <name>org.brainsciences.bmn.amazon.services.impl.ConfigServiceImpl</name>
    <primaryNodeType>sling:OsgiConfig</primaryNodeType>
    <property>
        <name>amazon.aws.ec2.instances.managed.metaphor</name>
        <value>i-d3a850ae,i-ef5fb292</value>
        <type>String[]</type>
    </property>
</node>


Rob

Re: multivalue in osgi config?

Posted by "Robert A. Decker" <de...@robdecker.com>.
Nevermind… I found this:
http://svn.apache.org/repos/asf/sling/trunk/samples/simple-demo/src/main/resources/SLING-INF/content/sample/sample_readme.txt

so, this should work:

<node>
   <name>org.brainsciences.bmn.amazon.services.impl.ConfigServiceImpl</name>
   <primaryNodeType>sling:OsgiConfig</primaryNodeType>
   <property>
       <name>amazon.aws.ec2.instances.managed.metaphor</name>
	<values>
           <value>i-d3a850ae=</value>
           <value>i-ef5fb292</value>
	</values>
       <type>String[]</type>
   </property>
</node>

On Oct 5, 2012, at 11:04 AM, Robert A. Decker wrote:

> Hi,
> 
> I'm trying to get a multi value to work in an osgi config. 
> 
> I've tried various combinations of String[], String with brackets on the value, etc but nothing seems to work.
> 
> Is it possible to have multi value strings in my osgi config?
> 
> <node>
>    <name>org.brainsciences.bmn.amazon.services.impl.ConfigServiceImpl</name>
>    <primaryNodeType>sling:OsgiConfig</primaryNodeType>
>    <property>
>        <name>amazon.aws.ec2.instances.managed.metaphor</name>
>        <value>i-d3a850ae,i-ef5fb292</value>
>        <type>String[]</type>
>    </property>
> </node>
> 
> 
> Rob