Just following with some pseudo code to be tried ....

        String property =
System.getProperty("org.castor.properties.custom");
        if (property != null && property.length() > 0) {
            File file = new File(property);
            if (file.exists()) {
                loadFromFile(properties, file);
            }
        }

could be inserted right before the putAll call.

Werner

Werner Guttmann wrote:
> Actually, have a look at org.castor.core.util.Configuration, lines 161ff
> 
>     protected void loadUserProperties(final String filename) {
>         Properties properties = new Properties();
> 
>         // Get common configuration from the classpath root, ignore if
> not found.
>         boolean onClasspathRoot = loadFromClassPath(properties, "/" +
> filename);
> 
>         // If not found on classpath root, either it doesn't exist, or
> "." is not part of
>         // the classpath, try looking at local working directory.
>         if (!onClasspathRoot) {
>             loadFromWorkingDirectory(properties, filename);
>         }
> 
>         _map.putAll(properties);
>     }
> 
> Basically, one could add more options to the algorithm implemented.
> 
> Regards
> Werner
> 
> John Huss wrote:
>> Perhaps a command line argument specifying a properties filename?
>>
>> The app I'm working on has an automatically generated classpath, so it's not
>> the easiest thing to change.  I can do it that way, but it's not my
>> preference.
>>
>> John
>>
>> On Wed, Jan 14, 2009 at 4:26 PM, Werner Guttmann 
>> <[email protected]>wrote:
>>
>>> Not really. What exactly are you looking for ?
>>>
>>> Werner
>>>
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to