ServiceBroker sb = serviceBroker;
  public void unload() {    ServiceBroker sb = serviceBroker;    if (agentIdService != null) {      sb.releaseService(this, AgentIdentificationService.class, agentIdService);      agentIdService = null;    }    if (nodeIdService != null) {      sb.releaseService(this, NodeIdentificationService.class, nodeIdService);      nodeIdService = null;    }    if (threadService != null) {      sb.releaseService(this, ThreadService.class, threadService);      threadService = null;    }    if (protoRegistryService != null) {      sb.releaseService(this, PrototypeRegistryService.class, protoRegistryService);      protoRegistryService = null;    }    if (bbMetricsService != null) {      sb.releaseService(this, BlackboardMetricsService.class, bbMetricsService);      bbMetricsService = null;    }    if (nodeMetricsService != null) {      sb.releaseService(this, NodeMetricsService.class, nodeMetricsService);      nodeMetricsService = null;    }    if (metricsService != null) {      sb.releaseService(this, MetricsService.class, metricsService);      metricsService = null;    }    if (messageStatsService != null) {      sb.releaseService(this, MessageStatisticsService.class, messageStatsService);      messageStatsService = null;    }    if (messageWatcherService != null) {      if (myMessageWatcher != null) {        messageWatcherService.removeMessageTransportWatcher(myMessageWatcher);        myMessageWatcher = null;      }      sb.releaseService(this, MessageWatcherService.class, messageWatcherService);      messageWatcherService = null;    }    if (rawLogger != null && rawLogger != LoggingService.NULL) {      sb.releaseService(this, LoggingService.class, rawLogger);      rawLogger = LoggingService.NULL;      logger = rawLogger;    }    super.unload();  }