private void configureFileWatcher() {
    AmbariEventPublisher ambariEventPublisher = injector.getInstance(AmbariEventPublisher.class);
    Configuration config = injector.getInstance(Configuration.class);
    SingleFileWatch watch = new SingleFileWatch(config.getConfigFile(), file -> ambariEventPublisher.publish(new AmbariPropertiesChangedEvent()));
    watch.start();
  }
Deprecated. Instead, use {@link StaticallyInject}.
<p/>
Static injection replacement to wait Persistence Service start.

@see StaticallyInject
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java