}
LegacyProcessor.process(beanClass.get(), enterpriseBean);
}
for (final Annotated<Class<?>> beanClass : finder.findMetaAnnotatedClasses(Stateless.class)) {
final Stateless stateless = beanClass.getAnnotation(Stateless.class);
final String ejbName = getEjbName(stateless, beanClass.get());
if (!isValidEjbAnnotationUsage(Stateless.class, beanClass, ejbName, ejbModule)) {
continue;
}
EnterpriseBean enterpriseBean = ejbJar.getEnterpriseBean(ejbName);
if (enterpriseBean == null) {
enterpriseBean = new StatelessBean(ejbName, beanClass.get());
ejbJar.addEnterpriseBean(enterpriseBean);
}
if (enterpriseBean.getEjbClass() == null) {
enterpriseBean.setEjbClass(beanClass.get());
}
if (enterpriseBean instanceof SessionBean) {
final SessionBean sessionBean = (SessionBean) enterpriseBean;
sessionBean.setSessionType(SessionType.STATELESS);
if (stateless.mappedName() != null) {
sessionBean.setMappedName(stateless.mappedName());
}
}
LegacyProcessor.process(beanClass.get(), enterpriseBean);
}