}
public static boolean loadHandler(ClassLoader loader1,
HandlerDescription desc) throws DeploymentException {
String handlername = desc.getClassName();
Handler handler;
try {
final Class handlerClass = Loader.loadClass(loader1, handlername);
Package aPackage = (Package)org.apache.axis2.java.security.AccessController
.doPrivileged(new PrivilegedAction() {
public Object run() {
return handlerClass.getPackage();
}
});
if (aPackage != null
&& aPackage.getName().equals("org.apache.axis2.engine")) {
String name = handlerClass.getName();
log.warn("Dispatcher " + name + " is now deprecated.");
if (name.indexOf("InstanceDispatcher") != -1) {
log.warn("Please remove the entry for "
+ handlerClass.getName() + "from axis2.xml");
} else {
log.warn(
"Please edit axis2.xml and replace with the same class in org.apache.axis2.dispatchers package");
}
}
handler = (Handler)org.apache.axis2.java.security.AccessController
.doPrivileged(new PrivilegedExceptionAction() {
public Object run() throws InstantiationException,
IllegalAccessException {
return handlerClass.newInstance();
}
});
handler.init(desc);
desc.setHandler(handler);
} catch (ClassNotFoundException e) {
if (handlername.indexOf("jaxws") > 0) {
log.warn("[JAXWS] - unable to load " + handlername);
return false;