Menu

CM Service initialization

2008-09-10
2012-11-28
  • Saravanan Bellan

    I have a basic question about the CM service. Is there some way I can have the default properties for a ManagedService initialized automatically from a external property file on the filesystem? Or is it upto the user to intialize the properties.

    Thanks,

     
    • Gunnar Ekolin

      Gunnar Ekolin - 2008-09-10

      The simplest way to do this is to write a small management bundle that reads your external property files and uses the ConfigurationAdmin service to upload the data to CM.

      Doing it this way will give you full control on file format, file location etc, etc.

      If you are interested in using default configurations that lives inside the bundle you should take a look at the OSGi compendium service named metatype.

       
    • jekatt

      jekatt - 2008-09-11

      I'm using the osgi config manager with the metatype service and can configure my managed service with the knopflerfish cm_desktop ui.
      Is there any way to set the order of my config parameters in the knopflerfish 'cm' tab?

      I've more than 15 config parameters and they are not ordered the way i listed them in the metatype.xml file. (seem to be ordered randomly?!)

      jens

       
      • Erik Wistrand

        Erik Wistrand - 2008-09-11

        The order of the parameters are as presented by the metatype implementation (thus not directly configurable inside the desktop).

        The kf_metatype loads the metatype data using HashMaps, thus losing the ordering information. A simple solution would be to replace this with LinkedHashMaps, but then we make the kf_metatype bundle Java 1.4 dependent.

        I'll add this as an enhancement request:

        http://sourceforge.net/tracker/index.php?func=detail&aid=2105612&group_id=82798&atid=567241

        /E

         

Log in to post a comment.

MongoDB Logo MongoDB