}
}
private VirtualHostConfiguration createVirtualHostConfiguration(String virtualHostName) throws ConfigurationException
{
VirtualHostConfiguration configuration;
String configurationFile = (String)getAttribute(CONFIG_PATH);
if (configurationFile == null)
{
final MyConfiguration basicConfiguration = new MyConfiguration();
PropertiesConfiguration config = new PropertiesConfiguration();
config.addProperty("store.type", (String)getAttribute(STORE_TYPE));
config.addProperty("store.environment-path", (String)getAttribute(STORE_PATH));
basicConfiguration.addConfiguration(config);
CompositeConfiguration compositeConfiguration = new CompositeConfiguration();
compositeConfiguration.addConfiguration(new SystemConfiguration());
compositeConfiguration.addConfiguration(basicConfiguration);
configuration = new VirtualHostConfiguration(virtualHostName, compositeConfiguration , _broker);
}
else
{
if (!new File(configurationFile).exists())
{
throw new IllegalConfigurationException("Configuration file '" + configurationFile + "' does not exist");
}
configuration = new VirtualHostConfiguration(virtualHostName, new File(configurationFile) , _broker);
}
return configuration;
}