The ejb-ref-name element contains the name of an EJB reference. The EJB
reference is an entry in the enterprise bean's environment. It is
recommended that name is prefixed with "ejb/".
Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
if (!descriptor.getEjbReferenceDescriptors().isEmpty()) {
for (Iterator itr = descriptor.getEjbReferenceDescriptors().iterator();
itr.hasNext();) {
EjbReferenceDescriptor nextEjbReference = (EjbReferenceDescriptor) itr.next();
String ejbRefName = nextEjbReference.getName();
if (!ejbRefName.startsWith("ejb/")) {
addWarningDetails(result, compName);
result.addWarningDetails(smh.getLocalString
(getClass().getName() + ".warning",
"Warning: [ {0} ] is not prefixed with recommended string " +
"ejb/ within bean [ {1} ]",
new Object[] {ejbRefName,descriptor.getName()}));
}
}
}
if (result.getStatus() != Result.WARNING) {
addGoodDetails(result, compName);
result.passed(smh.getLocalString
(getClass().getName() + ".passed",
"ejb-ref-name is properly defined within bean [ {0} ]",
new Object[] {descriptor.getName()}));
}
return result;