4 Replies Latest reply: Oct 9, 2012 8:38 AM by 000201 RSS

    GLOBAL.properties

    000201
      Guys,

      I would like to know the usage of GLOBAL.properties in ATG. Could you please
      share your thoughts.

      Thank you
        • 1. Re: GLOBAL.properties
          Praveer.Rai
          Hi,

          You can use this property file to share configurations/variables across multiple components .

          As per Oracle Docs "A global properties file can set the same property in multiple components. The property settings in a GLOBAL.properties file apply to all components in the file’s configuration directory and subdirectories".

          eg : you can loggingDebug=true for all components at a single place.

          ~ Praveer
          • 2. Re: GLOBAL.properties
            Praveer.Rai
            http://docs.oracle.com/cd/E23507_01/Platform.20073/ATGProgGuide/html/s0206globalpropertiesfiles01.html
            • 3. Re: GLOBAL.properties
              Nitin Khare
              GLOBAL.properties can be used to set same property in multiple components. E.g. if we have <ATG>\home\localconfig\GLOBAL.properties with these properties:

              loggingInfo=true
              loggingDebug=true
              loggingError=true
              loggingWarning=true

              Then it will enable all the logging for all components. In case a property is also declared in a component's own configuration then that will take precedence. E.g. with the same GLOBAL.properties as above if we have a component MyComp in MyModule (<ATG>\MyModule\config\my-comp-path\MyComp.properties) having the configuration as:

              loggingDebug=false
              loggingError=false
              loggingWarning=false

              Now MyComp will have only loggingInfo enabled.

              You can also use += and -= in MyComp configuration to respectively append and remove any property values set in GLOBAL.properties. E.g. if GLOBAL.properties has property as

              myList=A,B

              and in MyComp configuration you make it as

              myList+=C,D

              then MyComp will have myList values as A,B,C,D
              • 4. Re: GLOBAL.properties
                000201
                Excellent. Thank you Nithin and Rai.

                This is pretty clear to me.