You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
Work in progress list of enhancements to javax.enterprise.inject.spi for the CDI 1.0 maintenance release and CDI 1.1.
This is a generalization of CDI's built-in support for Java EE component environment resources
, allowing portable extensions to define their own annotations that work like @Resource, @PersistenceContext, @EJB and friends in a producer field declaration. For example:
@Produces @JMS(topic=".../prices") @Prices Topic topic;
We would need to introduce a new interface in the SPI package:
public interface Initializer<X> {
public X getInitialValue(AnnotatedField<?> field);
}
Along with a ProcessProducerField event type extending ProcessProducer with a setInitializer() method.
A convenience feature to minimize the number of anonymous classes implementing Bean and minimize implementation errors.
Add:
to BeanManager.
Or, perhaps:
Also add:
to BeanManager.
Wrapping the AnnotatedType just to add an annotation is a real PITA.
We should make it possible to mess with the scope/qualifiers/name/etc of a bean either from ProcessBean event, or, better from a ProcessBeanAttributes event which lets you wrap the BeanAttributes or give the container a new one created with BeanManager.createBeanAttributes().
Add ProcessModule event which let's you mess with the enabled alternatives/interceptors/decorators and more:
public interface ProcessModule {
public Set<Class> getAlternatives();
public List<Class> getInterceptors();
public List<Class> getDecorators();
public Set<AnnotatedType> getAnnotatedTypes();
public Set<Extension> getExtensions();
}
Add ProcessInjectionPoint event, along with BeanManager.createInjectionPoint(annotatedMember).
It's more convenient for a portable extension to use Instance than BeanManager.getBeans() followed by BeanManager.getInstance().
This is not 100% clear in the spec.
Add public <T extends Extension> T getExtension(Class<T> extensionClass) to BeanManager.
We should add Module and Bean.getModule() instead of using getBeanClass() as a proxy for the module when doing inter-module dependency resolution.
Looks good. Would the ProcessModule event allow you to add new AnnotatedTypes after you have already 'seen' all the existing annotated types in the Bean discovery phase?
Stuart, that's an interesting question. No, I have not yet looked into this issue, though I understand why you would want to do it. I think that with the new createBean() and createBeanAttributes() methods described above, the need for this goes away. WDYT?
Learn more about Weld...