try {
PortletContainerEnvironmentImpl environment = new PortletContainerEnvironmentImpl();
LogServiceImpl logService = new LogServiceImpl();
FactoryManagerServiceImpl factorManagerService = new FactoryManagerServiceImpl();
InformationProviderServiceImpl informationProviderService = new InformationProviderServiceImpl();
PropertyManagerService propertyManagerService = new PropertyManagerServiceImpl();
logService.init(servletConfig, null);
factorManagerService.init(servletConfig, null);
informationProviderService.init(servletConfig, null);
environment.addContainerService(logService);
environment.addContainerService(factorManagerService);
environment.addContainerService(informationProviderService);
environment.addContainerService(propertyManagerService);