[jsr366-experts] Re: Compatibility Problems with MR Resource Annotation Widening

From: Jason T. Greene <jason.greene_at_redhat.com>
Date: Tue, 3 Mar 2015 23:56:50 -0500 (EST)

So looking at what would be required to make CDI (the spec) fully support EE injection I think we would need the following (note this does not include the proposed change to make 250 annotations just work everywhere):

1. Clearly define (in EE and CDI) how the bean scanning mode impacts which beans are eligible for EE resource injection.

2. Define how EE method injection is supposed to work in CDI (e.g. What happens with producer methods)

3. Define how EE resource (et al) class annotations work with CDI (e.g. Abstract classes)

4. Define what happens to the above (1-3) when a bean is @Veteod or an alternative

5. Define new default namespace rules for CDI (e.g. Module vs App)

5. Add support to either beans.xml or relevant ee deployment descriptors to allow redefining all names that can possibly be created by @Resource on a CDI bean, such that metadata-complete can work. (This would also be needed to allow @ManagedBean to work with metadata-complete)

6. If metadata-complete is really supposed to work universally, then we need a complete bean definition language (also needed for @ManagedBean, interceptors, and probably many other EE specs)

7. Redefine the interaction, or alternatively lack thereof with portable extensions.