*/
introspect();
InjectManager beanManager = InjectManager.create();
BeanFactory factory = beanManager.createBeanFactory(_cl);
_annotatedType = factory.getAnnotatedType();
if (_name != null) {
factory.name(_name);
// server/2n00
if (! Map.class.isAssignableFrom(_cl))
addOptionalStringProperty("name", _name);
}
/*
if (getMBeanName() != null)
comp.setMBeanName(getMBeanName());
*/
// server/21q1
if (isStartup()
&& ! _annotatedType.isAnnotationPresent(Stateful.class)
&& ! _annotatedType.isAnnotationPresent(Stateless.class)
&& ! _annotatedType.isAnnotationPresent(MessageDriven.class)) {
factory.annotation(new Startup() {
public Class annotationType() { return Startup.class; }
});
}
for (Annotation binding : _bindingList) {
factory.binding(binding);
}
for (Annotation stereotype : _stereotypeList) {
factory.stereotype(stereotype.annotationType());
}
if (_scope != null) {
factory.scope(_scope);
// comp.setScope(_beanManager.getScopeContext(_scope));
}
/*
if (_isService) {
comp.addAnnotation(new AnnotationLiteral<Service>() {});
}
*/
/*
if (_newArgs != null)
comp.setNewArgs(_newArgs);
*/
if (_init != null)
factory.init(_init);
_bean = factory.bean();
introspectPostInit();
deploy();