[
https://issues.apache.org/jira/browse/DELTASPIKE-293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gerhard Petracek updated DELTASPIKE-293:
----------------------------------------
Remaining Estimate: (was: 72h)
Original Estimate: (was: 72h)
> Improve the ViewScopedContext by observing ServletContext and HttpSession
> lifecycle events.
> -------------------------------------------------------------------------------------------
>
> Key: DELTASPIKE-293
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-293
> Project: DeltaSpike
> Issue Type: Improvement
> Components: JSF-Module
> Affects Versions: 0.4-incubating
> Reporter: Radu Creanga
> Fix For: 0.5-incubating
>
>
> The CDI specification states that Context implementations are responsible for
> destroying instances it creates. The current ViewScopedContext relies on
> PreDestroyViewMapEvents to be notified when a view map is destroyed. But, the
> JSF 2.0 and 2.1 spec only fire this event when a view map is replaced. This
> means that in most cases, instances created by ViewScopedContext are not
> properly destroyed. The ViewScopedContext should be observing ServletContext
> and HttpSession lifecycle events instead in order to ensure that all
> instances it creates are properly destroyed. Visible improvements resulting
> out of this would be that the @PostConstruct method of @ViewScoped beans is
> invoked. Additionally, this will probably result in better memory usage,
> since instances that are not properly destroyed are not eligible for GC.
--
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