org.frameworkset.web.servlet.launcher.WAS70WebappClassLoader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bboss-mvc Show documentation
Show all versions of bboss-mvc Show documentation
bboss is a j2ee framework include aop/ioc,mvc,persistent,taglib,rpc,event ,bean-xml serializable and so on.http://www.bbossgroups.com
The newest version!
package org.frameworkset.web.servlet.launcher;
import java.lang.reflect.Method;
public class WAS70WebappClassLoader extends BaseAppServerClassLoader {
@Override
protected void addRepository(ClassLoader classLoader, String jarfile)
throws Exception {
Method addPaths = classLoader.getClass().getDeclaredMethod("addPaths", new Class[]{String[].class});
addPaths.invoke(classLoader,new Object[]{ new String[]{jarfile}});
// CompoundClassLoader classLoader_ = (CompoundClassLoader)classLoader;
// classLoader_.addPaths(new String[]{jarfile});
}
public boolean validate(ClassLoader classLoader) {
try
{
if(classLoader.getClass().getName().equals("com.ibm.ws.classloader.CompoundClassLoader"))
return true;
return false;
// CompoundClassLoader classLoader_ = (CompoundClassLoader)classLoader;
// return true;
}
catch(Exception e)
{
return false;
}
}
}