Config config = glassfish.getService(
Config.class, serverConfig.getConfigRef());
// Create a context object for this domain creation to enable the new
// modules to make decisions
DomainContext ctx = new DomainContext();
ctx.setDomainType("dev"); //TODO : Whenever clustering/HA is supported
// this setting needs to be fixed. Domain type can be dev/ha/cluster and
// this type needs to be extracted possibly using an api from installer
// bnevins 12/20/12 -- I'm not touching this ancient getLogger call.
// because it looks risky.
ctx.setLogger(LogDomains.getLogger(
DomainInitializer.class, LogDomains.SERVER_LOGGER));
// now for every such Inhabitant, fetch the actual initial config and
// insert it into the module that initial config was targeted for.
ServiceLocator habitat = glassfish.getService(ServiceLocator.class);