getTagName()));
introspect();
InjectManager beanManager = InjectManager.create();
BeanBuilder builder = beanManager.createBeanFactory(_cl);
if (builder == null)
return;
_annotatedType = builder.getAnnotatedType();
if (_name != null) {
// server/2n00
if (! Map.class.isAssignableFrom(_cl))
addOptionalStringProperty("name", _name);
}
if (getCdiNamed() != null) {
// env/02s7
builder.name(getCdiNamed());
}
if (_annotatedType.isAnnotationPresent(javax.ejb.Singleton.class)
|| _annotatedType.isAnnotationPresent(Stateful.class)
|| _annotatedType.isAnnotationPresent(Stateless.class)
|| _annotatedType.isAnnotationPresent(MessageDriven.class)) {
throw new ConfigException(L.l("{0} cannot be configured by <bean> because it has an EJB annotation. Use CDI syntax instead.",
_annotatedType));
}
// server/21q1
if (isStartup()
&& ! _annotatedType.isAnnotationPresent(Stateful.class)
&& ! _annotatedType.isAnnotationPresent(Stateless.class)
&& ! _annotatedType.isAnnotationPresent(MessageDriven.class)) {
builder.annotation(new StartupLiteral());
}
for (Annotation qualifier : _qualifierList) {
builder.qualifier(qualifier);
}
if (_name != null) {
builder.qualifier(Names.create(_name));
}
if (_qualifierList.size() == 0)
builder.qualifier(DefaultLiteral.DEFAULT);
for (Annotation stereotype : _stereotypeList) {
builder.stereotype(stereotype.annotationType());
}
if (_scope != null) {
builder.scope(_scope);
// comp.setScope(_beanManager.getScopeContext(_scope));
}
if (Singleton.class == _scope) {
builder.annotation(new StartupLiteral());
}
builder.annotation(_cdiManager.generateXmlCookie());
if (_init != null)
builder.init(_init);
_bean = builder.bean();
_extAnnotated = builder.getExtendedAnnotated();
introspectPostInit();
deploy();