예제 #1
0
 private synchronized void unLoadSchema(final String app) throws TddlException {
   SchemaConfig schema = schemas.remove(app);
   if (schema != null) {
     TDataSource dataSource = schema.getDataSource();
     if (dataSource != null) {
       dataSource.destroy();
     }
   }
 }
예제 #2
0
  @Override
  protected void doDestroy() throws TddlException {
    for (ConfigDataHandler cdh : cdhs.asMap().values()) {
      try {
        cdh.destroy();
      } catch (Exception e) {
        // ignore
      }
    }

    for (SchemaConfig schema : schemas.values()) {
      TDataSource dataSource = schema.getDataSource();
      try {
        if (dataSource != null) {
          dataSource.destroy();
        }
      } catch (Exception e) {
        // ignore
      }
    }
  }