castor

Enable loading of properties from a file specified at startup

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.3 rc1
  • Fix Version/s: 1.3
  • Component/s: Core
  • Labels:
    None
  • Number of attachments :
    1

Description

Enable loading of properties from a file specified at startup, rather than only from a file on the classpath.

In org.castor.core.util.Configuration, lines 161

protected void loadUserProperties(final String filename) {
       Properties properties = new Properties();

       .....

       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);
           }
       }

       _map.putAll(properties);
   }

Activity

Hide
Werner Guttmann added a comment -

Initial patch for review (and testing).

Show
Werner Guttmann added a comment - Initial patch for review (and testing).
Hide
Werner Guttmann added a comment -

Any feedback ?

Show
Werner Guttmann added a comment - Any feedback ?
Hide
John Huss added a comment -

I just tested this and it works great. Thanks a lot.

Show
John Huss added a comment - I just tested this and it works great. Thanks a lot.
Hide
Werner Guttmann added a comment -

Thanks, John. Was this after I actually applied the patch ?

Show
Werner Guttmann added a comment - Thanks, John. Was this after I actually applied the patch ?
Hide
John Huss added a comment -

Yes, I checked out the code from the repository and build a snapshot build.

Show
John Huss added a comment - Yes, I checked out the code from the repository and build a snapshot build.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
Not Specified
Original Estimate - Not Specified
Remaining:
0m
Remaining Estimate - 0 minutes
Logged:
50m
Time Spent - 50 minutes