[cdi-dev] [JBoss JIRA] Created: (CDI-165) Support lifecycle events for non-builtin contexts
Jozef Hartinger (JIRA)
jira-events at lists.jboss.org
Mon Sep 19 10:13:26 EDT 2011
Support lifecycle events for non-builtin contexts
Project: CDI Specification Issues
Issue Type: Feature Request
Affects Versions: 1.0
Reporter: Jozef Hartinger
Fix For: 1.1 (Proposed)
The original idea was to extend the API for context implementations to be able to notify the container of a context initialization / destruction. Based on this notification, the container would then notify the application by firing @Initialized(X) / @Destroyed(X) Object (where X is the scope annotation of the context - see CDI-86).
I don't think this double-notification approach is a good idea anymore. Instead, the specification should simply mention that the extensions providing an implementation of Context are encouraged to fire a @Initialized(X) event when the context is initialized and @Destroyed(X) event when the context is destroyed (again, see CDI-86 for details). Extensions are free to choose a payload that makes most sense for the given context (e.g. UIViewRoot instance for @ViewScoped) or Object otherwise.
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the cdi-dev