We aren't firing servlet events in CDI 1.1 due to backwards incompatibility issues with extensions.
On 18 Nov 2012, at 22:56, Radu Creanga wrote: > Hello everyone, > > It seems this will require ServletContext events and Session events to > be published to the CDI event bus, which in turn requires adding the > appropriate listeners to web.xml until CDI 1.1. I know Seam Solder has > these listeners implemented. Are there plans to import it into > DeltaSpike? > > Radu Creanga > > > On Sun, Nov 18, 2012 at 4:32 PM, Radu Creanga (JIRA) <[email protected]> wrote: >> Radu Creanga created DELTASPIKE-293: >> --------------------------------------- >> >> Summary: 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
