Hi Cristiano,

I have most experience in spring dm. Currently spring is the most comprehensive solution. The problem with spring dm is that you need to import any package the your spring config defines into your bundle. This is far from ideal but it works.

I have also some experience with blueprint (Apache Aries). I think it lacks some features but for the things it supports it works great. I think you should check if blueprint already does everything you need. If yes then it is the best option.

Declarative servcies are not so usefull as they are limited to just services while blueprint and spring dm have bigger scope.

For the container I propose you look at karaf + equinox if you need equinox. It should do all karaf + felix does. The good thing with karaf in general is that it provides great features for provisioning. So you can pull features and bundles from a maven repo. If you already use maven then this could be a killer feature.

For blueprint you use the following to access the config admin service:

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
           xmlns:bp="http://www.osgi.org/xmlns/blueprint/v1.0.0";
           
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0";
           
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0";
           default-activation="lazy">

    <cm:property-placeholder persistent-id="yourPropertyFileName" 
update-strategy="reload">
        <cm:default-properties>
            <cm:property name="sshPort" value="8101"/>
        </cm:default-properties>
    </cm:property-placeholder>

</blueprint>

Then you can access properties with ${propertyName}

If you use karaf then the config admin service is provided with the help of the fileinstall service. This allows you to simply create a file "yourPropertyFileName.cfg" in the etc dir of karaf. This file is then read and made available as a config admin resource with the filename as id. Each property in the file is available in blueprint then. The example above is from the ssh module of karaf which itself uses blueprint.

Btw. Have a look at the sources of Karaf to learn more blueprint :-)

Christian


Am 26.04.2011 16:41, schrieb Cristiano Gavião:
Hi Christian,

Actually, I would like a way to dynamically setup my app service using
Configuration admin service  and able its use on both equinox or
felix/karaf.

I could see that Declarative Services is out of box on equinox while Karaf
has Blueprint out of box.

Now I'm investigating if would be better to install blueprint on equinox or
DS on karaf. Initially I'm studying the second option.

any tip is welcomed?

cheers

Cristiano

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to