// initialize the result object
Result result = getInitializedResult();
addErrorDetails(result,
getVerifierContext().getComponentNameConstructor());
result.setStatus(Result.PASSED); //default status is PASSED
if(!isStatefulSessionBean(descriptor)) {
for (EntityManagerReferenceDescriptor emRefDesc : getEntityManagerReferenceDescriptors(descriptor)) {
if(emRefDesc.getPersistenceContextType().equals(PersistenceContextType.EXTENDED)) {
String unitName = emRefDesc.getUnitName() == null ? "" : emRefDesc.getUnitName();
result.failed(
smh.getLocalString(className + ".failed",
"Found a persistence unit by name [ {0} ] of EXTENDED context type.", new Object[]{unitName}));
}
}
}
return result;