[ 
http://issues.apache.org/jira/browse/CONFIGURATION-153?page=comments#action_12416624
 ] 

Oliver Heger commented on CONFIGURATION-153:
--------------------------------------------

I am interested in applying this patch for the next release of Commons 
Configuration to make the locating of configuration files more flexible. For 
this purpose we need some more things:

- All new files need to have the header with the Apache license. You can copy 
this from existing files.

- Can you use the same coding style or formatting options as the other source 
files use?

- Is there any chance for you to come up with some unit tests for the new 
classes?  Only tested code is added to our code base. You can have a look at 
the other unit tests under the src/tests directory. Or ping the dev-list if you 
need further support.

Thanks!

> [configuration] use a Strategy pattern for locating resources
> -------------------------------------------------------------
>
>          Key: CONFIGURATION-153
>          URL: http://issues.apache.org/jira/browse/CONFIGURATION-153
>      Project: Commons Configuration
>         Type: Improvement

>  Environment: Operating System: other
> Platform: Other
>     Reporter: Joshua Nichols
>     Priority: Minor
>  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.
-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to