Uploaded image for project: 'Jetspeed 2 (Retired)'
  1. Jetspeed 2 (Retired)
  2. JS2-557

Property Loader Valve

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1-dev
    • 2.1-dev, 2.1
    • Assembly/Configuration
    • None

    Description

      This is the property loader valve that we discussed yesterday. It
      provides a convenient way to make information within a property file
      available for the rendering of the decorators or portlets.

      The concept is that this object is loaded via Spring. There are three
      different constructors. In each case the key is used as the name of an
      attribute on the request. The value associated with this key is an
      instance of org.apache.commons.configuration.PropertiesConfiguration

      Constructors
      ===============
      1. Key name and property configuration object
      The property configuration object would need to be constructed and
      provided to the constructor. This is easily accomplished with Spring

      2. Key name and full path to the properties file
      The properties file is loaded into a property configuration object

      3. Key name
      The key name is used as both the key and the name of an environment
      variable that should contain the full path to the property file.

      The initialize method must be called at the time of creation so that the
      property configuration object can be properly loaded. An example of a
      Spring config is shown below:

      <bean id="propertyLoaderValve"
      class="com.fmr.portal.pipeline.impl.PropertyLoaderValve"
      init-method="initialize">
      <constructor-arg index="0">
      <value>php.props</value>
      </constructor-arg>
      </bean>

      The motivation for this valve was to externalize the configuration of a
      properties file. This becomes important when an application is
      installed in different locations that require differently property
      values. Our operations group is able to modify the path of the
      properties file within Websphere without having to edit any spring
      configuration files.

      Attachments

        Activity

          People

            taylor David Sean Taylor
            taylor David Sean Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: