Results 1 to 9 of 9

Thread: Deployment of properties for ConfigAdmin

  1. #1
    Join Date
    Dec 2005
    Location
    Philadelphia, PA, USA
    Posts
    228

    Default Deployment of properties for ConfigAdmin

    Greetings,

    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?
    Thanks
    Dmitry

  2. #2
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    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.
    Glyn Normington
    SpringSource

  3. #3
    Join Date
    Dec 2005
    Location
    Philadelphia, PA, USA
    Posts
    228

    Default

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

    From ConfigInstallArtifact I gather that file name should be in "service.pid".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.
    Thanks
    Dmitry

  4. #4
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    Yes, if you deploy a properties file its filename must end in ".properties" and we interpret the filename to be "service.pid".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.
    Glyn Normington
    SpringSource

  5. #5
    Join Date
    Dec 2005
    Location
    Philadelphia, PA, USA
    Posts
    228

    Default

    Done: https://issuetracker.springsource.com/browse/DMS-1235

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

    Thanks
    Thanks
    Dmitry

  6. #6
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    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.
    Glyn Normington
    SpringSource

  7. #7
    Join Date
    Feb 2010
    Posts
    3

    Default

    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. #8
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    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.
    Glyn Normington
    SpringSource

  9. #9
    Join Date
    Feb 2010
    Posts
    3

    Default 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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •