in contrib/TurbineYaafiComponentService.java [202:259]
protected ServiceContainerConfiguration createServiceContainerConfiguration( Configuration conf )
throws IOException
{
ServiceContainerConfiguration result = new ServiceContainerConfiguration();
// are we using a "containerConfiguration.xml" ?!
if( conf.containsKey(CONTAINER_CONFIGURATION_KEY) )
{
// determine the container configuration file
String containerConfiguration = conf.getString(
CONTAINER_CONFIGURATION_KEY
);
result.loadContainerConfiguration(containerConfiguration);
}
else if( conf.containsKey(COMPONENT_ROLE_KEY) )
{
// determine the location of the role configuraton file
String roleConfigurationFileName = conf.getString(
COMPONENT_ROLE_KEY,
COMPONENT_ROLE_VALUE
);
// determine the location of component configuration file
String componentConfigurationFileName = conf.getString(
COMPONENT_CONFIG_KEY,
COMPONENT_CONFIG_VALUE
);
// determine the location of parameters file
String parametersFileName = conf.getString(
COMPONENT_PARAMETERS_KEY,
COMPONENT_PARAMETERS_VALUE
);
result.setComponentRolesLocation( roleConfigurationFileName );
result.setComponentConfigurationLocation( componentConfigurationFileName );
result.setParametersLocation( parametersFileName );
}
else
{
// determine the container configuration file
String containerConfiguration = conf.getString(
CONTAINER_CONFIGURATION_KEY,
CONTAINER_CONFIGURATION_VALUE
);
result.loadContainerConfiguration(containerConfiguration);
}
return result;
}