Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
Set<Method> interceptorMethods = new HashSet<Method>();
if(descriptor.hasAroundInvokeMethod()) {
//XXX
/*
Method method = descriptor.getAroundInvokeMethod().getMethod(descriptor);
interceptorMethods.add(method);
*/
}
List<EjbInterceptor> interceptors = descriptor.getInterceptorChain();
for (EjbInterceptor interceptor : interceptors) {
try {
Class interceptorClass =
Class.forName(interceptor.getInterceptorClassName(),
false,
getVerifierContext().getClassLoader());
//XXX
/*
Method method = interceptor.getAroundInvokeMethod().getMethod(interceptorClass);
interceptorMethods.add(method);
*/
} catch (ClassNotFoundException e) {
Verifier.debug(e);
addErrorDetails(result, compName);
result.failed(smh.getLocalString
(getClass().getName() + ".failed1",
"[ {0} ] not found.",
new Object[] {interceptor.getInterceptorClassName()}));
}
}
for (Method method : interceptorMethods) {
Class[] exceptions = method.getExceptionTypes();
for (Class excepClass : exceptions) {
if(java.rmi.RemoteException.class.isAssignableFrom(excepClass)) {
addErrorDetails(result, compName);
result.failed(smh.getLocalString
(getClass().getName() + ".failed",
"Method [ {0} ] throws java.rmi.RemoteException.",
new Object[] {method}));
}
}
}
if(result.getStatus()!=Result.FAILED) {
addGoodDetails(result, compName);
result.passed(smh.getLocalString
(getClass().getName() + ".passed",
"Valid Interceptor methods."));
}
return result;