[cdi-dev] Notes from CDI EG 28/08/2012

Pete Muir pmuir at redhat.com
Tue Aug 28 10:11:35 EDT 2012


Joe Bergmark
===========

We reviewed the status of the issue Joe had worked on:

* Close CDI-235 as a dupe of CDI-219 (done)
* CDI-180 & CDI-223 Joe is going to strengthen the text that requires that a request context that is not initialized by a call, should not be ended by that call (Action Joe to send pull request)

Pete Muir
=======

* CDI-138, allow definition of qualifiers and interceptor bindings using annotated types, to allow @Nonbinding to be added programmatically to member values with a proposal at https://github.com/jboss/cdi/pull/41
   - Discussed whether it's better to fire a PAT (or another similar event?) for annotations, allowing them to be modified. Mark to file a new issue for this feature request. We need to collect use cases.
   - Should be able to apply @Nonbinding at annotation level (https://issues.jboss.org/browse/CDI-253)
   - Hold on applying this issue until we explore whether should fire an event to modify annotations
* CDI-218 Allow use of WEB-INF/classes/META-INF/beans.xml with a proposal at https://github.com/jboss/cdi/pull/74
   - Apply (done)
* CDI-214, Remove BeanManager from Servlet context, a revert of CDI-73 with a proposal at https://github.com/jboss/cdi/pull/74
   -Apply (done)
* CDI-177 Better handling of @Named defaults for qualifiers with a proposal at https://github.com/jboss/cdi/pull/77/files
   - Joe raised an issue that we will break existing CDI apps who have explicitly or implicitly (e.g. via a producer method) the same as a now defaulted qualifier
   - Mark thinks it's spec'd this way already, but Martin and I think it's not. Needs clarification!
   - Pete to investigate, but probably have to special case it that the name is only defaulted if not explicitly specified elsewhere or something
   - hold for now
* CDI-187 Interceptors and decorators should be required to be passivation capable, not serializable, with a proposal athttps://github.com/jboss/cdi/pull/78
   - Apply (done)
* CDI-234 Handle array and annotation valued members on qualifiers, with a proposal at https://github.com/jboss/cdi/pull/79
   - Definitely do this, removes a wart
   - Concern that JDK defined equality of arrays is not ideal in many cases for the way people use arrays on qualifiers
   - discussed a declarative approach (e.g. @Unordered)
   - discussed a SPI approach (user can specify a comparator to use)
   - discussed that we should expose a BeanManager.compare(qualifier1, qualifier2) type method that applys rules (https://issues.jboss.org/browse/CDI-223)
   - group preferred SPI approach
   - Pete to draft a proposal for SPI approach
* CDI-183 Require CDI.current() to work in Java EE servers with a proposal at https://github.com/jboss/cdi/pull/85
   - Update to require it to work only between BBD and BS (Pete)
* CDI-184 Add CDI.setCDIProvider() for environments where service providers don't work e.g. OSGi with a proposal at https://github.com/jboss/cdi/pull/86
   - Apply (done)
* CDI-165 Encourage custom context implementations to fire events when they are initialized and destroyed, with a proposal at https://github.com/jboss/cdi/pull/87
   - Apply (done)
* CDI-43 Adding filters to extensions to limit when they are called, with a proposal at https://github.com/jboss/cdi/pull/88
   - Update proposal to require considering meta-annotations as things the extension is interested in  (Pete) and then then apply
* CDI-245 & CDI-249 Discussion how extensions work, and what can be injected into them, with a proposal at https://github.com/jboss/cdi/pull/89 
   - Update proposal with latest discussion on issue, and also add an IllegalStateException if BeanManager.fireEvent() is called with an EventType that is assignable to a container lifecycle event type

Mark Struberg
===========

* CDI-60, @Veto etc.
   - Remove @Requires
   - Discussed that @Disabled might still be useful, to declaratively disable a bean, put still run it's PAT
   - Mike advocated very strongly in favor of @Vetoed which stops a class from passing through @PAT at all
   - Write up proposal and seek community feedback (Pete)


* CDI-228
   - Went through the issue and all agreed that the most important thing is to keep the semantics of all injection types the same by default
   - Proposed adding a @Throwaway (name tbc!) parameter annotation which indicates to the container that an injected bean has a truncated lifecycle, and is destroyed when the method/constructor invocation ends. This allows non-serializables beans (e.g. factories) to be injected into serializable beans. It also allows a dependent bean graph which must be kept around (to call a @PreDestroy somewhere) to be got rid of early. Mark to write up a proposal.


More information about the cdi-dev mailing list