[cdi-dev] [JBoss JIRA] (CDI-601) Add container lifecycle event fired before container destroys all contexts

Chris Rankin (JIRA) issues at jboss.org
Thu Jul 28 08:27:00 EDT 2016


    [ https://issues.jboss.org/browse/CDI-601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272053#comment-13272053 ] 

Chris Rankin commented on CDI-601:
----------------------------------

That does sound like the solution that I ended up implementing, yes. Except that I had to observe a {{@Destroyed(ApplicationScoped.class)}} event on the basis that it was fired before any beans were destroyed. And fortunately I had only one bean that needed this kind of special handling - I had no way of controlling the order in which {{@Destroyed(ApplicationScoped.class)}} events were handled.

> Add container lifecycle event fired before container destroys all contexts
> --------------------------------------------------------------------------
>
>                 Key: CDI-601
>                 URL: https://issues.jboss.org/browse/CDI-601
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>            Reporter: Martin Kouba
>             Fix For: 2.0 (discussion)
>
>
> The name might be something like {{BeforeContainerShutdown}}. Note that we probably cannot change the name or semantics of {{BeforeShutdown}}, which is fired after container destroys all contexts. The motivation is to allow the beans to perform some kind of cleanup before dependencies could be disposed (the ordering of destruction is not defined).



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the cdi-dev mailing list