Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
IASEjbExtraDescriptors ejbJar = descriptor.getIASEjbExtraDescriptors();
if(ejbJar!=null)
{
try
{
beanPool = ejbJar.getBeanPool();
if(beanPool!=null)
{
if(descriptor instanceof EjbSessionDescriptor && ((EjbSessionDescriptor)descriptor).getSessionType().equals(EjbSessionDescriptor.STATEFUL))
{
result.addWarningDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.warning(smh.getLocalString(getClass().getName()+".warning",
"WARNING [AS-EJB ejb] : bean-pool should be defined for Stateless Session Beans, Entity Beans or Message Driven Beans"));
}else if(descriptor instanceof EjbMessageBeanDescriptor || (descriptor instanceof EjbSessionDescriptor && ((EjbSessionDescriptor)descriptor).getSessionType().equals(EjbSessionDescriptor.STATELESS)) || descriptor instanceof EjbEntityDescriptor){
result.addGoodDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.passed(smh.getLocalString(getClass().getName()+".passed",
"PASSED [AS-EJB ejb] : bean-pool is correctly defined"));
}
}
else
{
result.addNaDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable",
"NOT APPLICABLE [AS-EJB ejb] : bean-pool element not defined"));
}
return result;
}catch(Exception ex)
{
result.addErrorDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.addErrorDetails(smh.getLocalString
(getClass().getName() + ".notRun",
"NOT RUN [AS-EJB] : Could not create a beanPool object"));
}
}
else
{
result.addErrorDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.addErrorDetails(smh.getLocalString
(getClass().getName() + ".notRun",
"NOT RUN [AS-EJB] : Could not create an IASEjbExtraDescriptor object"));
}
return result;