View | Details | Raw Unified | Return to bug 369941 | Differences between
and this patch

Collapse All | Expand All

(-)miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java (-3 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2002, 2009 IBM Corporation and others.
2
 * Copyright (c) 2002, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 41-46 Link Here
41
 * David McKnight  (IBM)  - [251729][dstore] problems querying symbolic link folder
41
 * David McKnight  (IBM)  - [251729][dstore] problems querying symbolic link folder
42
 * David McKnight  (IBM)  - [243495] [api] New: Allow file name search in Remote Search to not be case sensitive
42
 * David McKnight  (IBM)  - [243495] [api] New: Allow file name search in Remote Search to not be case sensitive
43
 * David McKnight  (IBM)  - [283617] [dstore] UniversalFileSystemMiner.handleQueryGetRemoteObject does not return correct result when the queried file does not exist.
43
 * David McKnight  (IBM)  - [283617] [dstore] UniversalFileSystemMiner.handleQueryGetRemoteObject does not return correct result when the queried file does not exist.
44
 * David McKnight  (IBM)  - [dstore] cancelable threads not removed fast enough from Hashmap, resulting in OOM
44
 *******************************************************************************/
45
 *******************************************************************************/
45
46
46
package org.eclipse.rse.dstore.universal.miners;
47
package org.eclipse.rse.dstore.universal.miners;
Lines 470-476 Link Here
470
			_dataStore.trace(e);
471
			_dataStore.trace(e);
471
		}
472
		}
472
		// save find thread in hashmap for retrieval during cancel
473
		// save find thread in hashmap for retrieval during cancel
473
		_cancellableThreads.put(command, thread);
474
		if (!thread.isDone() && !thread.isCancelled()){
475
			_cancellableThreads.put(command, thread);
476
		}
474
	}
477
	}
475
478
476
479
Lines 1352-1358 Link Here
1352
	}
1355
	}
1353
1356
1354
	public void finish() {
1357
	public void finish() {
1355
		//_archiveHandlerManager.dispose();
1358
		_cancellableThreads.clear();
1356
		super.finish();
1359
		super.finish();
1357
	}
1360
	}
1358
1361
(-)miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalDownloadHandler.java (-2 / +25 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2008 IBM Corporation and others.
2
 * Copyright (c) 2006, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 14-19 Link Here
14
 * Contributors:
14
 * Contributors:
15
 * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
15
 * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
16
 * Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
16
 * Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
17
 * David McKnight  (IBM)  - [dstore] cancelable threads not removed fast enough from Hashmap, resulting in OOM
17
 *******************************************************************************/
18
 *******************************************************************************/
18
19
19
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
20
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
Lines 24-29 Link Here
24
import java.io.FileNotFoundException;
25
import java.io.FileNotFoundException;
25
import java.io.IOException;
26
import java.io.IOException;
26
import java.io.UnsupportedEncodingException;
27
import java.io.UnsupportedEncodingException;
28
import java.lang.reflect.Method;
27
29
28
import org.eclipse.dstore.core.model.DE;
30
import org.eclipse.dstore.core.model.DE;
29
import org.eclipse.dstore.core.model.DataElement;
31
import org.eclipse.dstore.core.model.DataElement;
Lines 62-69 Link Here
62
	{
64
	{
63
		super.run();
65
		super.run();
64
		
66
		
65
		handleDownload(_cmdElement, _status);
67
		handleDownload(_cmdElement, _status);				
66
		_isDone = true;
68
		_isDone = true;
69
		removeFromCancellableList();
70
	}
71
	
72
	private void removeFromCancellableList(){
73
		Class clazz = _miner.getClass();
74
75
		try {
76
			Method[] methods = clazz.getDeclaredMethods();
77
			for (int i = 0; i < methods.length; i++){
78
				Method method = methods[i];
79
				if (method.getName().equals("updateCancellableThreads")){ //$NON-NLS-1$
80
					method.setAccessible(true);					
81
					Object[] args = { _status.getParent(), this };					
82
					method.invoke(_miner, args);
83
					return;
84
				}
85
			}
86
			
87
		} catch (Exception e) {
88
			_dataStore.trace(e);
89
		}
67
	}
90
	}
68
	
91
	
69
	public boolean isDone()
92
	public boolean isDone()

Return to bug 369941