// NOTE : be careful with "args" parameter. It is null
// if method signature has 0 arguments.
Class methodClass = method.getDeclaringClass();
if( methodClass == java.lang.Object.class ) {
return invokeJavaObjectMethod(this, method, args);
}
Object returnValue = null;
try {
// Since impl class isn't subtype of SEI, we need to do a
// method lookup to get method object to use for invocation.
Method implMethod = servletImplClass.getMethod
(method.getName(), method.getParameterTypes());
returnValue = implMethod.invoke(servletImplDelegate, args);
} catch(InvocationTargetException ite) {
logger.log(Level.FINE, "", ite);
throw ite.getCause();
} catch(Throwable t) {
logger.log(Level.INFO, "Error invoking servlet impl", t);
throw t;
}
return returnValue;