Result result = getInitializedResult();
ComponentNameConstructor compName = new ComponentNameConstructor(descriptor);
SunEjbJar ejbJar = descriptor.getEjbBundleDescriptor().getIasEjbObject();
Ejb testCase = null;
boolean oneFailed = false;
if(ejbJar!=null)
{
testCase = super.getEjb(descriptor.getName(),ejbJar);
Principal principal = testCase.getPrincipal();
if(principal == null)
{
result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable",
"NOT APPLICABLE [AS-EJB ejb] : principal element not defined"));
}
else
{
String principalName = principal.getName();
if(principalName.length()==0)
{
result.failed(smh.getLocalString(getClass().getName()+".failed",
"FAILED [AS-EJB principal] : name cannot be an empty String"));
}
else
{
result.passed(smh.getLocalString(getClass().getName()+".passed",
"PASSED [AS-EJB principal] : name is {0}", new Object[]{principalName}));
}
}
}
else
{
result.addErrorDetails(smh.getLocalString
(getClass().getName() + ".notRun",
"NOT RUN [AS-EJB] : Could not create an SunEjbJar object"));
}
return result;