FileInstall is pluggable and can support additional file format.
For this, you need to register a org.apache.felix.fileinstall.
ArtifactUrlTransformer
or org.apache.felix.fileinstall.ArtifactInstaller class in the OSGi
registry.  We do leverage that in Karaf to provide support for blueprint
and spring xml files, on-the-fly jar -> bundle, kar files and feature
repositories.

This does not directly plug into the ConfigAdmin, so you'd have to do that
yourself.


2017-06-14 22:49 GMT+02:00 dynamodan <[email protected]>:

> I found this thread because of a similar need -- I store a configuration in
> yaml format for a java application that I'm "OSGi-fying".  The flat
> dictionary isn't going to work for me, nor is the
> `${karaf.etc}/worker-config.yaml` method going to work (it won't monitor
> the
> worker-config.yaml for updates!).
>
> +jbonofre, you mentioned something about an adapter:
>
>
> jbonofre wrote
> > What do you mean exactly ? You want to load the yaml configuration in
> > ConfigAdmin ? In that case, it's possible in an adapter.
>
> That would be cool, but if it is even simpler, let's be format-agnostic,
> and
> just implement and register a ManagedService.updated() function that gets
> run any time the filesystem detects a change (along the lines of
> java.nio.file.WatchService).  Send a null java.util.Dictionary object and
> let the function sort out what changed, if anything.
>
> Thanks in advance!
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Complex-config-tp4043584p4050746.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
------------------------
Guillaume Nodet

Reply via email to