You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Emmanuel Bourg (JIRA)" <ji...@apache.org> on 2007/04/10 17:23:32 UTC

[jira] Updated: (CONFIGURATION-153) Use a strategy pattern for locating resources

     [ https://issues.apache.org/jira/browse/CONFIGURATION-153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bourg updated CONFIGURATION-153:
-----------------------------------------

    Environment:     (was: Operating System: other
Platform: Other)
        Summary: Use a strategy pattern for locating resources  (was: [configuration] use a Strategy pattern for locating resources)

> Use a strategy pattern for locating resources
> ---------------------------------------------
>
>                 Key: CONFIGURATION-153
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-153
>             Project: Commons Configuration
>          Issue Type: Improvement
>            Reporter: Joshua Nichols
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: 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 my.properties and default.properties) via
> spring. So, I go to kick off tomcat. If the current directory I'm in has a
> my.properties or default.properties.... 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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