Revision 1663

tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/TXMClassLoader.java (revision 1663)
2 2

  
3 3
import java.util.HashSet;
4 4

  
5
import org.eclipse.osgi.internal.loader.EquinoxClassLoader;
6
import org.txm.utils.logger.Log;
7

  
5 8
public class TXMClassLoader extends ClassLoader {
6 9
	private HashSet<ClassLoader> loaders;
7 10

  
......
16 19
    	} catch(Exception e) {}
17 20
    	
18 21
        for (ClassLoader cl : loaders) {
22
        	
23
        	// FIXME: SJ: tests to speed up this very long process        	
24
//        	if(cl instanceof EquinoxClassLoader)	{
25
//        		EquinoxClassLoader ecl = (EquinoxClassLoader) cl;
26
//        		
27
//            	//Log.finest("TXMClassLoader.findClass(): looking for class " + name + " in bundle " + ecl.getBundle().getSymbolicName());
28
//
29
//            	// FIXME: trying to skip Bundle where Bundle id not matching the class package
30
//            	String pack = name.split("\\$")[0];
31
//            	if(!ecl.getBundle().getSymbolicName().startsWith(pack))	{
32
//                	// FIXME: SJ: for debugging to speed up the process
33
//                	//Log.finest("TXMClassLoader.findClass(): skipping bundle " + ecl.getBundle().getSymbolicName() + " for class starting with " + pack);
34
//            		continue;
35
//            	}
36
//        	}
37
//        	
38

  
19 39
        	try {
20 40
        		return cl.loadClass(name);
21 41
        	} catch(Exception e) {}

Also available in: Unified diff