The ejb-name must conform to the lexical rules for an NMTOKEN
Result result = getInitializedResult();
String ejbName = descriptor.getName();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
// The ejb-name must conform to the lexical rules for an NMTOKEN
if (!(NameToken.isNMTOKEN(ejbName))) {
// it's bad, test should not pass
addErrorDetails(result, compName);
result.failed
(smh.getLocalString
(getClass().getName() + ".failed",
"Error: [ {0} ] does not conform to the lexical rules of NMTOKEN within bean [ {1} ]",
new Object[] {ejbName, descriptor.getName()}));
} else {
addGoodDetails(result, compName);
result.passed
(smh.getLocalString
(getClass().getName() + ".passed",
"[ {0} ] conforms to the lexical rules of NMTOKEN within bean [ {1} ]",
new Object[] {ejbName, descriptor.getName()}));
}
return result;