if(scenario == null)
{
throw new IllegalArgumentException("No deployment scenario in context");
}
ContainerRegistry registry = containerRegistry.get();
if (registry == null)
{
throw new IllegalArgumentException("No container registry in context");
}
if (!containerExists(registry.getContainers(), containerQualifier))
{
throw new IllegalArgumentException("No container with the specified name exists");
}
if (!isManualContainer(registry.getContainers(), containerQualifier))
{
throw new IllegalArgumentException("Could not start " + containerQualifier + " container. The container life cycle is controlled by Arquillian");
}
List<Deployment> managedDeployments = scenario.startupDeploymentsFor(new TargetDescription(containerQualifier));
Container container = registry.getContainer(new TargetDescription(containerQualifier));
for (String name : config.keySet())
{
container.getContainerConfiguration().overrideProperty(name, config.get(name));
}