Browse Source

REPORT-85774 sqlserver死锁

newui
abel 2 years ago
parent
commit
d60c0c7a95
  1. 13
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java

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

@ -209,7 +209,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
* @return
*/
private boolean needUpdate0(Connection origin, Connection connection) {
return !connection.equals(origin) || !isEmbedConnection(connection);
return !connection.equals(origin) || !isEmbedConnection(connection);
}
/**
@ -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