* {@link #didInitialize}.
*/
public static void initializeSharedConfiguration(Configuration conf) {
// check to see whether we can proceed
if (!conf.canInitialize()) {
throw new ConfigurationException("Configuration of class "
+ conf.getClass().getName()
+ " refused to be initialized.");
}
try {
// initialize configuration
conf.initialize();
// call post-initialization hook
conf.didInitialize();
// set the initialized Configuration only after success
Configuration.sharedConfiguration = conf;
}
catch (Exception ex) {
throw new ConfigurationException(
"Error during Configuration initialization. " + ex.getMessage(),
ex);
}
}