portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Sean Taylor (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Resolved: (JS2-557) Property Loader Valve
Date Tue, 18 Jul 2006 18:42:15 GMT
     [ http://issues.apache.org/jira/browse/JS2-557?page=all ]

David Sean Taylor resolved JS2-557.

    Resolution: Fixed

contribution from David Gurney

> Property Loader Valve
> ---------------------
>                 Key: JS2-557
>                 URL: http://issues.apache.org/jira/browse/JS2-557
>             Project: Jetspeed 2
>          Issue Type: New Feature
>          Components: Assembly/Configuration
>    Affects Versions: 2.1-dev
>            Reporter: David Sean Taylor
>         Assigned To: David Sean Taylor
>            Priority: Minor
>             Fix For: 2.1-dev
> 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.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org

View raw message