Enterprise bean's name test.
The Bean provider must assign a logical name to each enterprise bean in
the ejb-jar file.
Result result = getInitializedResult();
String ejbName = descriptor.getName();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
if (!ejbName.equals("")) {
// as long as it's not blank, test should pass
//result.passed("EJB logical name is : "+ejbName);
addGoodDetails(result, compName);
result.passed(smh.getLocalString
(getClass().getName() + ".passed",
"EJB logical name is: [ {0} ]",
new Object[] {ejbName}));
} else {
addErrorDetails(result, compName);
// it's blank, test should not pass
result.failed(smh.getLocalString
(getClass().getName() + ".failed",
"Error: EJB logical name cannot be blank."));
}
return result;