Announcement Announcement Module
No announcement yet.
Deployment of properties for ConfigAdmin Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Deployment of properties for ConfigAdmin


    Will dmServer have a standard location for deployment of properties files used by ConfigAdmin? Is it part of plan deployment and /pickup is the location or files placed in /config will be picked up?

    Am I looking too far ahead?

  • #2
    The placement of config files is like other deployed artefacts: you can put then in a repository, drop them in the pickup directory, or deploy them by URI (via admin console, JMX, or ApplicationDeployer service). We also deploy config files from the config directory, but we don't actively monitor this directory for changes unlike the pickup directory.


    • #3
      I was trying to find information on the format of properties files.

      From ConfigInstallArtifact I gather that file name should be in "".properties format.

      That would work for ManagedService.

      What is the format of the properties for ManagedServiceFactory? Is that even supported yet?

      I am trying to set-up a data source ManagedServiceFactory and allow developers to drop a file for a new datasource to show up.


      • #4
        Yes, if you deploy a properties file its filename must end in ".properties" and we interpret the filename to be "".properties as you observed. The resultant configuration will be made available to a managed service specifying that PID.

        However, we don't yet support associating properties files with managed service factories. I guess there would need to be some convention, either in the naming of the properties file or via some reserved property inside the file, to identify the PID of the managed service factory to be used.

        If you would like us to consider supporting this use case in the future, I'd be grateful if you could raise a user story on JIRA.


        • #5

          Also noticed that M3 fails to deploy .properties files from pickup directory but CI-B336 build works!



          • #6
            Thanks for raising the user story.

            Deployment of .properties files was introduced by commit 20ae05d400bbf153451ac2133351416718f12cb4 and this was merged into master after M3, so you are right, it shouldn't work in M3.


            • #7
              Is it still the case that ManagedServiceFactories don't pick up deployed configurations? I've been trying to configure an instance and failing to get any response. If it is now supported, how does one link a configuration file to a specific factory: persumably by putting the factory service pid somewhere in the deployed properties file


              • #8
                We still do not support associating properties files with managed service factories. I'm afraid that is nowhere on our list of priorities. Perhaps you would like to raise a Virgo bugzilla as someone in the community may step up to it.


                • #9
                  Setting service properties for managed service factories

                  I'm experimenting with workarounds where I set up a managed service factory and then either use ConfigurationAdmin.createFactoryConfiguration or ManagedServiceFactory.updated() to create and register a service instance. Either seems to do the basic job, problem is that neither appears to offer a way of setting the properties with which the service is registered, so I can't filter for the correct service at the point of use. Am I correct in thinking the configuration properties supplied to these methods are used only for configuring the bean instance and not to set service properties? Is there a way of doing that?