We have a component that requires an array of strings. See the code below
for the config declaration.


    public @interface Config {


        @AttributeDefinition(name = "Services list")

        String[] services_list();


    }

This works if we set the config attribute to be an array. It does not seem
to work though
when I configure the config using a .cfg file in karaf.

As far as I know there I can only use plain strings. So our list can be
represented as Service1,Service2 but this is not automatically converted to
an array.

What is the best practice to work with this?

I have seen a StringPlus class in aries rsa that takes care of this but it
would be a manual processing. Is there some way that DS or config admin can
do this for us transparently?

Christian

-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to