Browse Source

Pull request #10815: REPORT-85774 sqlserver死锁

Merge in DESIGN/design from ~ABEL.CHEN/design:release/11.0 to release/11.0

* commit 'd60c0c7a958df3b66410f8920e37ed0c018f9393':
  REPORT-85774 sqlserver死锁
release/11.0
abel.chen-陈亮 2 years ago
parent
commit
a5de167edf
  1. 11
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java

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

@ -257,12 +257,21 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
}
private boolean saveByOldWay(List<String> removedConnNames, List<ConnectionBean> addedOrUpdatedConnections) {
final int remaining = ConnectionConfig.getInstance().getRemainingCon(removedConnNames.size(), addedOrUpdatedConnections.size());
try {
return Configurations.modify(new WorkerFacade(ConnectionConfig.class) {
@Override
public void run() {
removedConnNames.forEach(n -> ConnectionConfig.getInstance().removeConnection(n));
addedOrUpdatedConnections.forEach(cb -> ConnectionConfig.getInstance().addConnection(cb.getName(), cb.getConnection()));
int innerRemaining = remaining;
for (ConnectionBean cb : addedOrUpdatedConnections) {
if (innerRemaining > 0) {
ConnectionConfig.getInstance().addConnectionWithoutCheck(cb.getName(), cb.getConnection());
innerRemaining--;
} else {
break;
}
}
}
});
} catch (Exception e) {

Loading…
Cancel
Save