Result result = getInitializedResult();
ComponentNameConstructor compName =
getVerifierContext().getComponentNameConstructor();
ClassLoader cl = getVerifierContext().getClassLoader();
try {
Class intfCls = Class.forName(descriptor.getMessageListenerType(), false, cl);
Class ejbCls = Class.forName(descriptor.getEjbClassName(), false, cl);
Method[] intfMethods = intfCls.getMethods();
for (Method method : intfMethods) {
for (Method ejbMethod : ejbCls.getMethods()) {
// if matching method is found then check the assertion
if (MethodUtils.methodEquals(ejbMethod, method)) {
if(Modifier.isFinal(ejbMethod.getModifiers()) ||
Modifier.isStatic(ejbMethod.getModifiers())) {
addErrorDetails(result, compName);
result.failed(smh.getLocalString
(getClass().getName() + ".failed",
"Wrong method [ {0} ]",
new Object[]{ejbMethod}));
}
break;
}
}// another test will report failure if listener method is not found
}
} catch (ClassNotFoundException e) {} // will be caught in other tests
if(result.getStatus() != Result.FAILED) {
addGoodDetails(result, compName);
result.passed(smh.getLocalString
(getClass().getName() + ".passed",
"Valid message listener method(s)."));
}
return result;