@PostConstruct
  public void setup() {
    SecurityFactory.setAuthzManager(new RuntimeAuthorizationManager());

    final IOService service =
        new IOServiceIndexedImpl(
            watchService,
            config.getIndexEngine(),
            DublinCoreView.class,
            VersionAttributeView.class,
            OtherMetaView.class);

    if (clusterServiceFactory == null) {
      ioService = service;
    } else {
      ioService = new IOServiceClusterImpl(service, clusterServiceFactory, false);
    }

    this.ioSearchService = new IOSearchIndex(config.getSearchIndex(), ioService);
  }
 @PreDestroy
 private void cleanup() {
   config.dispose();
   ioService.dispose();
 }