[cdi-dev] [JBoss JIRA] (CDI-497) session scope doesn't follow session lifecycle
Romain Manni-Bucau (JIRA)
issues at jboss.org
Tue Jan 6 05:06:29 EST 2015
[ https://issues.jboss.org/browse/CDI-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030113#comment-13030113 ]
Romain Manni-Bucau commented on CDI-497:
----------------------------------------
Yes Antoine.
{code}
/**
* Invalidates this session then unbinds any objects bound
* to it.
*
* @throws IllegalStateException if this method is called on an
* already invalidated session
*/
void invalidate();
{code}
This unbind bound objects so basically the scope doesn't have any sense later, id is also changed and session is often recycled (pooling implementation are quite common), it can just introduce inconsistencies IMO - ie make the same session used in 2 requests which are not linked at all, create leaks if the app relies on session id etc...
> session scope doesn't follow session lifecycle
> ----------------------------------------------
>
> Key: CDI-497
> URL: https://issues.jboss.org/browse/CDI-497
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Reporter: Romain Manni-Bucau
>
> ATM session destroyed event is bound to the request. this means a logout will not be able to access the right session when destroyed since most of the time logout = session destruction and then you can recreate a session (login case).
> Would be great to align CDI scopes - and then events - to the real lifecycle of the underlying observed event.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the cdi-dev
mailing list