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);
String commitOption = testCase.getCommitOption();
if(commitOption!=null)
{
if(commitOption.length()==0)
{
result.failed(smh.getLocalString(getClass().getName()+".failed",
"FAILED [AS-EJB ejb] : commit-option cannot be an empty String"));
}
else
{
if(!commitOption.equals("A") && !commitOption.equals("B") //4699329
&& !commitOption.equals("C"))
{
result.failed(smh.getLocalString(getClass().getName()+".failed1",//4699329
"FAILED [AS-EJB ejb] : commit-option cannot be {0}. " +
"It must be one of A, B and "+
"C", new Object[]{commitOption}));
}
else
{
if(descriptor instanceof EjbEntityDescriptor)
{
result.passed(smh.getLocalString(getClass().getName()+".passed",
"PASSED [AS-EJB ejb] : commit-option is {0}", new Object[]{commitOption}));
}
else
{
result.warning(smh.getLocalString(getClass().getName()+".warning",
"WARNING [AS-EJB ejb] : commit-option should be defined only for an Entity Bean"));
}
}
}
}
else
{
result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable",
"NOT APPLICABLE [AS-EJB ejb] commit-option Element is not defined"));
}
}
else
{
result.addErrorDetails(smh.getLocalString
(getClass().getName() + ".notRun",
"NOT RUN [AS-EJB] : Could not create an SunEjbJar object"));
}
return result;