[
https://issues.jboss.org/browse/CDI-4?page=com.atlassian.jira.plugin.syst...
]
Dan Allen commented on CDI-4:
-----------------------------
I don't really think it's counter intuitive. A special circumstance, sure. But not
counter intuitive. In a stateful system, there are times when one observer is going to
need to affect the state of the system in such a way that it needs to come before other
observers of the same event. We have this in Servlet, we have this in JSF and I think we
need to have it in CDI too.
One concrete use case is an observer that responds to the Servlet Initialized Event
(assuming we had such an integration) to prepare the request and initialize other context
variables so that all other observers of the same event can use these prepared resources.
The inverse is needed on destroy.
Need a way to provide ordering for Event observers (@Observes)
--------------------------------------------------------------
Key: CDI-4
URL:
https://issues.jboss.org/browse/CDI-4
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Events, Portable Extensions
Affects Versions: 1.0
Environment: All
Reporter: Lincoln Baxter III
Fix For: TBD
There needs to be a way to specify some kind of ordering for Event observers.
Understandably, this is somewhat counter-intuitive to the general concept of observing an
event, but there is going to be need for this in an upcoming JBoss project. While it can
be done manually, it might be nice to have a built-in API.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira