// default modules registry is the one that created the habitat
habitat.addIndex(new ExistingSingletonInhabitant<ModulesRegistry>(this),
ModulesRegistry.class.getName(), null);
habitats.put(name, habitat);
habitat.initialized();
return habitat;
} catch (Exception e) {
throw new ComponentException("Failed to create a habitat",e);
}