コード例 #1
0
  @Override
  public void close() throws Exception {
    // it would be nice, if elements in the CoreRegistry implemented (Auto)Closeable

    // The StorageManager creates a thread pool (through TaskMaster)
    // which isn't closed automatically
    StorageManager storageManager = CoreRegistry.get(StorageManager.class);
    if (storageManager != null) {
      storageManager.shutdown();
    }

    CoreRegistry.clear();

    super.close();
  }