Jozef Hartinger created CDI-354:
-----------------------------------
Summary: Inappropriate payload of the @Initialized(ConversationScoped.class)
event
Key: CDI-354
URL:
https://issues.jboss.org/browse/CDI-354
Project: CDI Specification Issues
Issue Type: Bug
Components: Contexts
Affects Versions: 1.1.PFD
Reporter: Jozef Hartinger
Assignee: Pete Muir
Priority: Blocker
Fix For: 1.1.FD
{quote}
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.
{quote}
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