0 Replies Latest reply on May 21, 2010 7:50 AM by Chris Jansen

    System Properties Service - Read from LDAP

    Chris Jansen Newbie

      Hello everyone,

       

      I'm new to the community but have been a user of JBoss AS for the last year and a bit. My company have recently stepped up usage of JBoss for development and are about to roll out a large number of applications under 5.1.0GA.

       

      We have been facing a major configuration management problem as a lot of the applications are configured using system properties, also with the system properties service starting after the main deployer, our developers were simply passing them in as arguments to the JVM. This was solved quite easily by taking the contents of deploy/properties-service.xml and placing it in conf/jboss-service.xml.

       

      This allowed us to load system properties from files in the conf directory before the main deployer started, however having lots of properties files across many servers causes a headache for our support staff.

       

      We use LDAP for the configuration of one of our applications and it seems ideal for storing system properties that are common to many servers. I've created a new LDAP schema for storing system properties and desinged a structure for properties to be inherited and overridden. I've also modifed the system properties service to read in these properties directly from LDAP.

       

      The structure looks like below, where the Base DN contains properties that can be used by any server on the network, the Pool DN contains properties that can be used byy any cluster in that pool, the Cluster DN contains properties that can be used by any server in that cluster, and the Server DN contains properties that can only be used by a specific server.

       

      Base DN

           |--------------Pool DN

           |                    |--------------Cluster DN

           |                                           |--------------Server DN

           |                                           |--------------Server DN

           |                    |--------------Cluster DN

           |                                           |--------------Server DN

           |--------------Pool DN

                                |--------------Cluster DN

                                                       |--------------Server DN

       

      The properties under the Server DN can override any property of the same name further up the tree. For example the Tomcat ports are defined at the Base DN, but anywhere below there in the tree can override that setting.

       

      This setup is quite specific to our architecture, but I think it's something that others may find useful. I don't think it is something that could be merged into the JBoss source as it is a bit of hack to both code and config: I'm accessing LDAP directly instead of using the LDAP service, because the LDAP service configuration is in the deploy directory and starts after the properties service. I imagine I could change this, but that would mean more config hacking.

       

      Is anyone interested in seeing my modified code for the system properties service? I warn you, my coding skills aren't exactly polished!