[cdi-dev] [JBoss JIRA] Commented: (CDI-30) An API for managing built in contexts
Mark Struberg (JIRA)
jira-events at lists.jboss.org
Mon May 2 05:50:18 EDT 2011
[ https://issues.jboss.org/browse/CDI-30?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599366#comment-12599366 ]
Mark Struberg commented on CDI-30:
----------------------------------
hmm not sure if we really should add this.
This was certainly a good thing back at the time when we discussed this. But from trying to use CDI's own @ConversationScoped in a real world JSF project I must say - it doesn't work out. Reason is that our CDI Conversation is lazy-starting which is way too late for JSF applications. Because what happens if you have a mandatory field not set or any other JSR-303 or JSF validation issue? In this case your action - which would make the conversation long-running - just doesn't get invoked! So you end up with a standard @RequestScoped behaviour and your bean will over and over get created again with each view hit.
Also: CDI conversations doesn't prevent opening an action link in a new window or tab, which makes them unusable for multi windowed applications.
I guess the same reasons apply why CODI introduced an own ConversationScoped and why Seam3 also introduced an own one, right?
So, since the CDI @ConversationScoped is kind of naturally restricted, I'm not sure if it's really worth adding a complex management SPI for it.
> An API for managing built in contexts
> -------------------------------------
>
> Key: CDI-30
> URL: https://issues.jboss.org/browse/CDI-30
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Contexts
> Affects Versions: 1.0
> Reporter: Nicklas Karlsson
> Fix For: 1.1 (Proposed)
>
>
> Add management API for built in contexts allowing them to be reused as needed.
--
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
mailing list