Help

Controls

Switch Workspace

Built with Seam

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.

Comparing current revision with historical revision 3.
Document History: Portable Extension Wishlist
Current revision:
12
Parent:
Weld
Created On:
19. Nov 2009, 22:20 (gavin)
Last Modified On:
30. Dec 2009, 00:16 (gavin)
Historical revisions:
11 30. Dec 2009, 00:14 (gavin) ShowDiff
10 30. Dec 2009, 00:13 (gavin) ShowDiff
9 29. Dec 2009, 23:55 (gavin) ShowDiff
8 29. Dec 2009, 23:33 (gavin) ShowDiff
7 29. Dec 2009, 23:25 (gavin) ShowDiff
6 29. Dec 2009, 22:26 (gavin) ShowDiff
5 02. Dec 2009, 21:52 (gavin) ShowDiff
4 23. Nov 2009, 23:53 (gavin) ShowDiff
3 20. Nov 2009, 21:05 (gavin) ShowDiff
2 20. Nov 2009, 01:26 (gavin) ShowDiff
1 19. Nov 2009, 22:21 (gavin) ShowDiff
0 (Initial Revision) ShowDiff

From line 0 changed to line 0:
Work in progress list of enhancements to |javax.enterprise.inject.spi| for the CDI 1.0 maintenance release.
Work in progress list of enhancements to |javax.enterprise.inject.spi| for the CDI 1.0 maintenance release and CDI 1.1.
From line 2 changed to line 2:
++ Ability to wrap the |InjectionPoint|
++ Producer field initializers
From line 4 changed to line 4:
Add |ProcessInjectionPoint| event.
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:
From line 6 changed to lines 6 to 7:
Also add |BeanManager.createInjectionPoint(annotatedMember)|.
`@Produces @JMS(topic=".../prices")
@Prices Topic topic;`
From line 8 changed to line 9:
++ Ability to process alternatives, interceptors and deocrators of a module
We would need to introduce a new interface in the SPI package:
From lines 10 to 12 changed to lines 11 to 13:
Add |Module| object with |getAlternatives()|, |getInterceptors()| and |getDecorators()|
Add |ProcessModule| event.
Add |BeanManager.getModule()|.
`public interface Initializer<X> {
public X getInitialValue(AnnotatedField<?> field);
}`
From line 14 changed to line 15:
++ Ability to obtain a container-created bean for a |Producer| or |InjectionTarget|
Along with a |ProcessProducerField| event type extending |ProcessProducer| with a |setInitializer()| method.
From line 16 added to lines 17 to 18:
++ Ability to obtain a container-created bean for a |Producer| or |InjectionTarget| or for an |AnnotatedType|

From line 31 changed to line 34:
++ Ability to override attributes of a |Bean|.
Also add:
From line 33 added to lines 36 to 41:
= |createBean(AnnotatedType at)|

to |BeanManager|.

++ Ability to override attributes of a |Bean|

From line 35 changed to lines 44 to 76:
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()|.
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()|.

++ Ability to process modules

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();
}`

++ Ability to wrap the |InjectionPoint|

Add |ProcessInjectionPoint| event, along with |BeanManager.createInjectionPoint(annotatedMember)|.

++ Allow injection of |Instance<X>| into portable extensions

It's more convenient for a portable extension to use |Instance| than |BeanManager.getBeans()| followed by |BeanManager.getInstance()|.

++ Clarify that there can be multiple |AnnotatedType| instances per Java class

This is not 100% clear in the spec.

++ Obtain |Extension| instances from |BeanManager|

Add |public <T extends Extension> T getExtension(Class<T> extensionClass)| to |BeanManager|.

++ Use |Module| object, instead of |Class| for inter-module dependency resolution

We should add |Module| and |Bean.getModule()| instead of using |getBeanClass()| as a proxy for the module when doing inter-module dependency resolution.