Skip to content

Commit

Permalink
dump filtered config file
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwechner committed Jun 25, 2012
1 parent 8465284 commit 8698345
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/java/org/wyona/yanel/core/map/RealmDefaultImpl.java
Expand Up @@ -81,7 +81,7 @@ public class RealmDefaultImpl implements Realm {
* Init realm
*/
public RealmDefaultImpl(String name, String id, String mountPoint, File configFile) throws Exception {
// TODO: Get realm name from config if name is null (see method configure())!
// INFO: If name is null, then get realm name from config (see method configure(Configuration)).
this.name = name;

this.id = id;
Expand All @@ -98,6 +98,8 @@ public RealmDefaultImpl(String name, String id, String mountPoint, File configFi
try {
config = builder.buildFromFile(configFile);
configure(config);
// INFO: Dump ...
new org.apache.avalon.framework.configuration.DefaultConfigurationSerializer().serialize(new java.io.FileOutputStream(new File(configFile.getAbsolutePath() + ".filtered")), config);
} catch (SAXException e) {
// TODO: CascadingSAXException cse = new CascadingSAXException(e);
log.error(e, e);
Expand All @@ -113,6 +115,7 @@ public RealmDefaultImpl(String name, String id, String mountPoint, File configFi

/**
* Configure realm based on configuration
* @param config Configuration
*/
protected void configure(Configuration config) throws Exception {
Yanel yanel = Yanel.getInstance();
Expand Down

0 comments on commit 8698345

Please sign in to comment.