2 Replies Latest reply on Mar 1, 2012 10:55 AM by Sergio Angelo

    Destroy annotation doesn't work for APPLICATON scoped components

    Evgeny Denisov Newbie

      Seam 2.2.0.GA


      I've just noticed that @Destroy has no effect for APPLICATION scoped components. @Create work well, but @Destroy method is not called during undeployment.


      I even was no able to catch context destroy event by using


      @Observer(value = "org.jboss.seam.preDestroyContext.APPLICATION")



      because org.jboss.seam.contexts.Lifecycle.endApplication is called by org.jboss.seam.servlet.SeamListener when Events.exists() already FALSE.


      Does anybody knows how to workaround this problem? I really need this because my Application scoped components starting asynchronous jobs at @Create stage.