Browse Source

Pull request #9565: REPORT-76370 提供一个数据连接前置检查接口&写错了应该是远程调用

Merge in DESIGN/design from ~RINOUX/design:release/11.0 to release/11.0

* commit 'a7f480e69febf415cf8dcfafaa8c5bcaae7ff44a':
  REPORT-76370 提供一个数据连接前置检查接口&写错了应该是远程调用
release/11.0
rinoux 2 years ago
parent
commit
ffa024f15f
  1. 3
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java

3
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java

@ -6,6 +6,7 @@ import com.fr.data.impl.ConnectionBean;
import com.fr.data.impl.JDBCDatabaseConnection; import com.fr.data.impl.JDBCDatabaseConnection;
import com.fr.data.impl.JNDIDatabaseConnection; import com.fr.data.impl.JNDIDatabaseConnection;
import com.fr.data.metric.utils.DatabaseConnectionMetricHandler; import com.fr.data.metric.utils.DatabaseConnectionMetricHandler;
import com.fr.data.operator.DataOperator;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.data.MapCompareUtils; import com.fr.design.data.MapCompareUtils;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
@ -203,7 +204,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
for (ConnectionBean connectionBean : addedOrUpdatedConnections) { for (ConnectionBean connectionBean : addedOrUpdatedConnections) {
Connection connection = connectionBean.getConnection(); Connection connection = connectionBean.getConnection();
try { try {
connection.validateSettings(); DataOperator.getInstance().validateConnectionSettings(connection);
} catch (Exception e) { } catch (Exception e) {
throw new SQLException(Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Invalid_Config", connectionBean.getName()) + ", " + e.getMessage(), e.getCause()); throw new SQLException(Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Invalid_Config", connectionBean.getName()) + ", " + e.getMessage(), e.getCause());
} }

Loading…
Cancel
Save