use of org.eclipse.che.inject.lifecycle.DestroyModule in project che by eclipse.
the class CheBootstrap method getModules.
@Override
protected List<Module> getModules() {
// based on logic that getServletModule() is called BEFORE getModules() in the EverrestGuiceContextListener
modules.add(new InitModule(PostConstruct.class));
modules.add(new DestroyModule(PreDestroy.class, LOG_HANDLER));
modules.add(new URIConverter());
modules.add(new URLConverter());
modules.add(new FileConverter());
modules.add(new PathConverter());
modules.add(new StringArrayConverter());
modules.add(new PairConverter());
modules.add(new PairArrayConverter());
modules.addAll(ModuleScanner.findModules());
Map<String, Set<String>> aliases = readConfigurationAliases();
Module firstConfigurationPermutation = Modules.override(new WebInfConfiguration(aliases)).with(new ExtConfiguration(aliases));
Module secondConfigurationPermutation = Modules.override(firstConfigurationPermutation).with(new CheSystemPropertiesConfigurationModule(aliases));
Module lastConfigurationPermutation = Modules.override(secondConfigurationPermutation).with(new CheEnvironmentVariablesConfigurationModule(aliases));
modules.add(lastConfigurationPermutation);
return modules;
}
Aggregations