commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <>
Subject [jira] [Resolved] (CONFIGURATION-153) Use a strategy pattern for locating resources
Date Sun, 29 Sep 2013 17:26:23 GMT


Oliver Heger resolved CONFIGURATION-153.

    Resolution: Fixed

It is now (finally) possible to define a strategy for loading configuration files.

> Use a strategy pattern for locating resources
> ---------------------------------------------
>                 Key: CONFIGURATION-153
>                 URL:
>             Project: Commons Configuration
>          Issue Type: Improvement
>            Reporter: Joshua Nichols
>            Priority: Minor
>             Fix For: 2.0
>         Attachments: ASF.LICENSE.NOT.GRANTED--locator-strategy.patch
> Currently, the method for locating resources (ie ConfigurationUtils.locate )
> uses a few means of finding the resource. However, the ways of finding resources
> are set in stone.
> At times, it would be useful to be able to pick and choose how resources are
> located. Here's an example:
> I have a webapp that builds a CompositeConfiguration composed of several
> PropertiesConfigurations (we'll say and via
> spring. So, I go to kick off tomcat. If the current directory I'm in has a
> or those files get used instead of the ones
> on the classpath that I intended to be used. As a result, unexpected behavior of
> the webapp ensues.
> The solution to this is to encapsulate each algorithm for locating resoucess,
> and be able to pick and choose. To me, this screamed of the strategy pattern.
> A patch is forthcoming...

This message was sent by Atlassian JIRA

View raw message