[cdi-dev] [JBoss JIRA] (CDI-354) Inappropriate payload of the @Initialized(ConversationScoped.class) event
Jozef Hartinger (JIRA)
jira-events at lists.jboss.org
Sat Mar 16 12:31:41 EDT 2013
Jozef Hartinger created CDI-354:
Summary: Inappropriate payload of the @Initialized(ConversationScoped.class) event
Project: CDI Specification Issues
Issue Type: Bug
Affects Versions: 1.1.PFD
Reporter: Jozef Hartinger
Assignee: Pete Muir
Fix For: 1.1.FD
An event with qualifier @Initialized(ConversationScoped.class) is fired when the conversation context is initialized
and an event with qualifier @Destroyed(ConversationScoped.class) is fired when the conversation is destroyed.
The event payload is:
• the conversation id if the conversation context is destroyed and is not associated with a current Servlet request, or
• the ServletRequestEvent if the application is a web application deployed to a Servlet container, or
• any java.lang.Object for other types of application.
The conversation context is supposed to be activated in a container-provided filter with the name "CDI Conversation Filter". A Servlet Filter itself does not have access to a ServletRequestEvent instance (that is only available to ServletRequestListeners). Therefore, the implementation would either have to re-create the instance by combining ServletRequest and ServletContext or propagate the ServletRequestEvent from a ServletRequestListener.
>From an application point of view, ServletRequest is the only interesting property of ServletRequestEvent anyway. Therefore, I suggest to change the wording of the spec to specify ServletRequest (or HttpServletRequest) as the payload of @Initialized(ConversationScoped.class) and @Destroyed(ConversationScoped.class) events.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the cdi-dev