1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 14:15:23 +02:00

[294933] [dstore] RSE goes into loop

This commit is contained in:
David McKnight 2009-11-13 20:01:19 +00:00
parent c6be7b244e
commit 76a87d4be9
2 changed files with 15 additions and 3 deletions

View file

@ -16,12 +16,14 @@
* David McKnight (IBM) - [244388] [dstore] Connection hangs when a miner not installed
* David McKnight (IBM) - [278341] [dstore] Disconnect on idle causes the client hang
* Noriaki Takatsu (IBM) - [283656] [dstore][multithread] Serviceability issue
* David McKnight (IBM) - [294933] [dstore] RSE goes into loop
*******************************************************************************/
package org.eclipse.dstore.internal.core.server;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.eclipse.dstore.core.java.IRemoteClassInstance;
@ -271,10 +273,15 @@ public class ServerCommandHandler extends CommandHandler
clientTicket.setAttribute(DE.A_VALUE,DataStoreResources.model_valid);
DataElement host = _dataStore.getHostRoot();
_dataStore.getHashMap().remove(host.getId());
HashMap map = _dataStore.getHashMap();
synchronized (map){
map.remove(host.getId());
}
host.setAttribute(DE.A_ID, "host." + serverTicket.getName()); //$NON-NLS-1$
_dataStore.getHashMap().put(host.getId(), host);
synchronized (map){
map.put(host.getId(), host);
}
_dataStore.update(host);
}
else

View file

@ -15,11 +15,13 @@
* David McKnight (IBM) - [202822] don't need to remove children from map here
* David McKnight (IBM) - [255390] check memory to determine whether to queue
* David McKnight (IBM) - [261644] [dstore] remote search improvements
* David McKnight (IBM) - [294933] [dstore] RSE goes into loop
*******************************************************************************/
package org.eclipse.dstore.internal.core.util;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import org.eclipse.dstore.core.model.DataElement;
@ -193,7 +195,10 @@ public class DataElementRemover extends Handler
private void unmap(DataElement element)
{
_dataStore.getHashMap().remove(element.getId());
HashMap map = _dataStore.getHashMap();
synchronized (map){
map.remove(element.getId());
}
}