public void initialize()
throws RegistryException
{
try
{
CombinedConfiguration configuration;
if ( StringUtils.isNotBlank( properties ) )
{
try
{
DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
DefaultExpressionEngine expressionEngine = new DefaultExpressionEngine();
expressionEngine.setPropertyDelimiter( propertyDelimiter );
builder.setExpressionEngine( expressionEngine );
StringSearchInterpolator interpolator = new StringSearchInterpolator( "${", "}" );
// interpolation as plexus did it before
interpolator.addValueSource( new PropertiesBasedValueSource( System.getProperties() ) );
String interpolatedProps = interpolator.interpolate( properties );
logger.debug( "Loading configuration into commons-configuration, xml {}", interpolatedProps );
builder.load( new StringReader( interpolatedProps ) );
configuration = builder.getConfiguration( false );
configuration.setExpressionEngine( expressionEngine );
//configuration.set
}
catch ( InterpolationException e )
{
throw new RuntimeException( e.getMessage(), e );
}
}
else
{
logger.debug( "Creating a default configuration - no configuration was provided" );
configuration = new CombinedConfiguration();
}
configuration.addConfiguration( new SystemConfiguration() );
this.configuration = configuration;
}
catch ( ConfigurationException e )
{