public LocalManagementContext( Builder builder, Map<String, Object> brooklynAdditionalProperties, DataGridFactory datagridFactory) { super(builder.build(), datagridFactory); // TODO in a persisted world the planeId may be injected this.managementPlaneId = Strings.makeRandomId(8); this.managementNodeId = Strings.makeRandomId(8); checkNotNull(configMap, "brooklynProperties"); this.builder = builder; this.brooklynAdditionalProperties = brooklynAdditionalProperties; if (brooklynAdditionalProperties != null) configMap.addFromMap(brooklynAdditionalProperties); this.locationManager = new LocalLocationManager(this); this.accessManager = new LocalAccessManager(); this.usageManager = new LocalUsageManager(this); if (configMap.getConfig(OsgiManager.USE_OSGI)) { this.osgiManager = new OsgiManager(); osgiManager.start(); } INSTANCES.add(this); log.debug("Created management context " + this); }