Result result = getInitializedResult();
ComponentNameConstructor compName = new ComponentNameConstructor(descriptor);
SunEjbJar ejbJar = descriptor.getEjbBundleDescriptor().getIasEjbObject();
if(ejbJar!=null)
{
getBeanPool(descriptor,ejbJar);
if(beanPool!=null)
{
if(descriptor instanceof EjbSessionDescriptor
&& ((EjbSessionDescriptor)descriptor).getSessionTypeString().equals(EjbSessionDescriptor.STATEFUL)
|| descriptor instanceof EjbEntityDescriptor)
{
result.warning(smh.getLocalString(getClass().getName()+".warning1",
"WARNING [AS-EJB ejb] : bean-pool should be defined for Stateless Session Beans or Message Driven Beans"));
}
}
else
{
if(descriptor instanceof EjbMessageBeanDescriptor
|| (descriptor instanceof EjbSessionDescriptor
&& ((EjbSessionDescriptor)descriptor).getSessionTypeString().equals(EjbSessionDescriptor.STATELESS)))
{
result.warning(smh.getLocalString(getClass().getName()+".warning",
"WARNING [AS-EJB ejb] : bean-pool should be defined for Stateless Session and Message Driven Beans"));
}
else
result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable",
"NOT APPLICABLE [AS-EJB ejb] : bean-pool element not defined"));
}
return result;
}
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 SunEjbJar object"));
return result;
}