public static ServiceLocator getStaticBaseServiceLocator() { return getStaticHabitat(); }
public SerialInitContextFactory() { // Issue 14396 Habitat temp = defaultHabitat ; if (temp == null) { temp = Globals.getDefaultHabitat() ; } if (temp == null) { // May need to initialize hk2 component model in standalone client temp = Globals.getStaticHabitat() ; } habitat = temp ; }
public SerialInitContextFactory() { // Issue 14396 ServiceLocator temp = defaultServices; if (temp == null) { temp = Globals.getDefaultHabitat() ; } if (temp == null) { // May need to initialize hk2 component model in standalone client temp = Globals.getStaticHabitat() ; } services = temp ; }
/** */ @Override protected int executeCommand() throws CommandException, CommandValidationException { File domainXMLFile = getDomainXml(); logger.finer("Domain XML file = " + domainXMLFile); try { Habitat habitat = Globals.getStaticHabitat(); ConfigParser parser = new ConfigParser(habitat); URL domainURL = domainXMLFile.toURI().toURL(); DomDocument doc = parser.parse(domainURL); Dom domDomain = doc.getRoot(); Domain domain = domDomain.createProxy(Domain.class); DomainXmlVerifier validator = new DomainXmlVerifier(domain); if (validator.invokeConfigValidator()) return 1; } catch (Exception e) { throw new CommandException(e.getMessage()); } return 0; } }
habitat = Globals.getStaticHabitat();
ServiceLocator habitat = Globals.getStaticHabitat(); ConfigParser parser = new ConfigParser(habitat); URL domainURL = domainXMLFile.toURI().toURL();
Habitat habitat = Globals.getStaticHabitat(); ConfigParser parser = new ConfigParser(habitat); URL domainURL = domainXMLFile.toURI().toURL();
static private Habitat getHabitat() { Habitat habitat = Globals.getStaticHabitat(); StartupContext startupContext = new StartupContext(); habitat.add(new ExistingSingletonInhabitant(startupContext)); habitat.addComponent(null, new ProcessEnvironment(ProcessEnvironment.ProcessType.Other)); return habitat; } }
services = Globals.getStaticHabitat();