[
https://issues.apache.org/jira/browse/OWB-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856094#action_12856094
]
Mark Struberg commented on OWB-351:
-----------------------------------
this got removed intentionally because it is usually not necessary and had
problematic side effects like picking up the wrong contextual instance if used
in multithreaded scenarios.
If cyclic @PostConstruct and @Inject methods must not occur (as defined in
JSR-250), we can either drop it completely. If not we must only use this very
CreationalContext until we leave Contextual<T>#create() and must not use it
later if the application uses the proxy!
> OWB picks up @SessionScoped contextual instances from expired sessions
> ----------------------------------------------------------------------
>
> Key: OWB-351
> URL: https://issues.apache.org/jira/browse/OWB-351
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Context and Scopes
> Affects Versions: M4
> Reporter: Mark Struberg
> Assignee: Mark Struberg
> Priority: Blocker
> Fix For: 1.0.0
>
>
> We currently store the CreationalContext instance from creating time inside
> the NormalScopedBeanInterceptorHandler.
> This leads to the fact that we pickup the contextual instance stored in that
> very CreationalContext even if the context itself is long time gone (e.g. if
> the session expired. This also leads to the side effect that we currently
> pickup contextual instances from the wrong session if the proxy gets injected
> into a wider scoped instance (e.g. an @ApplicationScoped bean).
> Thus, we must drop the CreationalContext from all our NormalScoped proxies
> and create a new CreationalContext each time we create a new contextual
> instance.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira