If I understand your question correctly, you can do this with ConfigAdmin.
You can use either ComponentFactory or use "simple" component and provide
the factory PID in the MetaType (http://www.aqute.biz/Bnd/MetaType).
In both cases you can have multiple instances of the same service by
creating multiple configuration files of named
"<factoryPID>-anything_you_like.cfg". I'm not sure if the naming pattern is
something you can configure in FileInstall or not.

Best,
Milen

On Fri, Apr 17, 2015 at 5:40 PM, lbu <[email protected]> wrote:

> All,
>
> I'm learning Declarative Services so I'm "upgrading" an application based
> on
> Karaf and Blueprint to DS and I'm having troubles understanding how to
> achieve the same or similar behavior:
>
> I have a bundle which contains a service that is supposed to be
> instantiated
> multiple time with setup and with blueprint I do so by hot-deploying a
> number of blueprint file in xml, what I'd like to do with DS is creating a
> service for each configuration in ${karaf.home}/etc that matched a "prefix"
> like my.service-instance1, my.service-instance2, etc. I had a look at DS
> Component Factory but I do not know if it is the right option.
>
> Do you think that my expected behavior can be implemented with DS ?
>
> Best regards,
> Luca
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Declarative-Services-with-Karaf-tp4039768.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
http://about.me/milen

Reply via email to