Run a verifier test against an individual declared message
drive bean component
Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
Class mbc = loadMessageBeanClass(descriptor, result);
if (mbc!=null) {
Method m = getMethod(mbc, getMethodName(),null);
if (m!=null) {
String returnType = m.getReturnType().getName();
if ("void".equalsIgnoreCase(returnType)) {
result.addGoodDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.passed(smh.getLocalString
("com.sun.enterprise.tools.verifier.tests.ejb.messagebean.EjbCreateReturnType.passed",
"Message-Drive bean [ {0} ] {1} implementation has a void return type",
new Object[] {(descriptor).getEjbClassName(),m.getName()}));
} else {
result.addErrorDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.failed(smh.getLocalString
("com.sun.enterprise.tools.verifier.tests.ejb.messagebean.EjbCreateReturnType.failed",
"Error: Message-Drive bean [ {0} ] {1} return type is [ {1} ]",
new Object[] {(descriptor).getEjbClassName(), returnType}));
}
} else {
result.addErrorDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.failed(smh.getLocalString
("com.sun.enterprise.tools.verifier.tests.ejb.messagebean.EjbCreateExists.failed",
"Error: Message-Drive bean [ {0} ] does not implement an {1} with no arguments",
new Object[] {(descriptor).getEjbClassName(), getMethodName()}));
}
}
return result;