Result result = getInitializedResult();
ComponentNameConstructor compName = new ComponentNameConstructor(descriptor);
SunEjbJar ejbJar = descriptor.getEjbBundleDescriptor().getIasEjbObject();
boolean oneFailed = false;
if(ejbJar!=null)
{
Ejb testCase = getEjb(descriptor.getName(),ejbJar);
ResourceRef resRefs[] = testCase.getResourceRef();
if(resRefs.length > 0)
{
for(int j=0;j<resRefs.length;j++)
{
String refName = resRefs[j].getResRefName();
try
{
descriptor.getResourceReferenceByName(refName);
result.passed(smh.getLocalString(getClass().getName()+".passed",
"PASSED [AS-EJB resource-ref] : res-ref-name {0} is verified with ejb-jar.xml",
new Object[]{refName}));
}
catch(IllegalArgumentException iaex)
{
Verifier.debug(iaex);
result.failed(smh.getLocalString(getClass().getName()+".failed",
"FAILED [AS-EJB resource-ref] : The res-ref-name {0} is not defined in ejb-jar.xml for this bean",
new Object[]{refName}));
}
}
}
else
{
result.notApplicable(smh.getLocalString
(getClass().getName() + ".notApplicable",
"{0} Does not define any resource-ref Elements",
new Object[] {descriptor.getName()}));
}
}
else
{
result.addErrorDetails(smh.getLocalString
(getClass().getName() + ".notRun",
"NOT RUN [AS-EJB] : Could not create an SunEjbJar object"));
}
return result;