コード例 #1
0
  @Override
  protected ForegroundModuleResponse beanDeleted(
      SimpleDataSourceDescriptor bean,
      HttpServletRequest req,
      HttpServletResponse res,
      User user,
      URIParser uriParser)
      throws Exception {

    this.dataSourceCache.delete(bean.getDataSourceID());

    return super.beanDeleted(bean, req, res, user, uriParser);
  }
コード例 #2
0
  @Override
  protected ForegroundModuleResponse beanUpdated(
      SimpleDataSourceDescriptor bean,
      HttpServletRequest req,
      HttpServletResponse res,
      User user,
      URIParser uriParser)
      throws Exception {

    if (bean.isEnabled()) {
      this.dataSourceCache.update(bean);
    } else {
      this.dataSourceCache.stop(bean.getDataSourceID());
    }

    return super.beanUpdated(bean, req, res, user, uriParser);
  }