Bean interface type test.
The bean provider must provide either Local or Remote or Both interfaces
Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
if (!(descriptor instanceof EjbSessionDescriptor) &&
!(descriptor instanceof EjbEntityDescriptor)) {
addNaDetails(result, compName);
result.notApplicable(smh.getLocalString
("com.sun.enterprise.tools.verifier.tests.ejb.intf.InterfaceClassExist.notApplicable1",
"Test apply only to session or entity beans."));
return result;
}
if ((descriptor.getRemoteClassName() == null || "".equals(descriptor.getRemoteClassName()))&&
(descriptor.getLocalClassName() == null || "".equals(descriptor.getLocalClassName()))) {
if (implementsEndpoints(descriptor)) {
addNaDetails(result, compName);
result.notApplicable(smh.getLocalString
("com.sun.enterprise.tools.verifier.tests.ejb.webservice.notapp",
"Not Applicable because, EJB [ {0} ] implements a Service Endpoint Interface.",
new Object[] {compName.toString()}));
return result;
}
else {
addErrorDetails(result, compName);
result.failed(smh.getLocalString
(getClass().getName() + ".failed",
"Ejb [ {0} ] does not have local or remote interfaces",
new Object[] {descriptor.getEjbClassName()}));
return result;
}
}
else {
addGoodDetails(result, compName);
result.passed(smh.getLocalString
(getClass().getName() + ".passed",
"Ejb [ {0} ] does have valid local and/or remote interfaces",
new Object[] {descriptor.getEjbClassName()}));
return result;
}