&& (annotated.isAnnotationPresent(Stateful.class)
|| annotated.isAnnotationPresent(Stateless.class)
|| annotated.isAnnotationPresent(Singleton.class)
|| annotated.isAnnotationPresent(MessageDriven.class)
|| annotated.isAnnotationPresent(JmsMessageListener.class))) {
EjbManager ejbContainer = EjbManager.create();
if (bean instanceof ManagedBeanImpl<?>) {
// XXX: shouldn't reach processBeanImpl
if (true)
throw new IllegalStateException(String.valueOf(annotated));
ManagedBeanImpl<T> mBean = (ManagedBeanImpl<T>) bean;
AnnotatedType<T> annType = mBean.getAnnotatedType();
ejbContainer.createBean(annType, mBean.getInjectionTarget());
if (event instanceof ProcessBeanImpl<?>)
((ProcessBeanImpl<?>) event).veto();
}
}