Is Configuration something that can change at runtime?

I'm wondering because of this code:

    final static Factory getNewFactory(Configuration configuration) {
        if (configuration == null) {
            return 
getNewFactory(DefaultConfiguration.DEFAULT_CONFIGURATION);
        }
        else {
            return new Factory(
                configuration.getDataSource(),
                configuration.getConnection(),
                configuration.getDialect(),
                configuration.getSettings(),
                configuration.getSchemaMapping(),
                configuration.getData());
        }
    }

Wouldn't it make more sense to pass the Configuration instance to the 
constructor instead and save it as an instance inside of the Factory 
instead of taking it apart?


Reply via email to