Browse Source

REPORT-8526 10.0定义数据连接超过三个无法保存

master
kerry 7 years ago
parent
commit
fe5a531248
  1. 12
      designer-base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java

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

@ -1,5 +1,6 @@
package com.fr.design.data.datapane.connect;
import com.fr.config.utils.UniqueKey;
import com.fr.data.impl.Connection;
import com.fr.data.impl.JDBCDatabaseConnection;
import com.fr.data.impl.JNDIDatabaseConnection;
@ -12,6 +13,7 @@ import com.fr.file.ConnectionConfig;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Nameable;
import com.fr.stable.StringUtils;
@ -154,7 +156,15 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
for (int i = 0; i < res_array.length; i++) {
NameObject nameObject = res_array[i];
connectionConfig.addConnection(nameObject.getName(), (Connection) nameObject.getObject());
if(nameObject.getObject() instanceof UniqueKey){
try{
Connection cloneConnection = (Connection)((UniqueKey)nameObject.getObject()).clone();
connectionConfig.addConnection(nameObject.getName(), cloneConnection);
}catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}
}
}
Loading…
Cancel
Save