1 Reply Latest reply on Nov 16, 2008 3:57 PM by atait

    Detect undeployment

    blabno

      How can i detect that my application is being undeployed ?
      I'm starting several threads that do not get stopped when application is redeployed and I would like to stop them.


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



      or


      @Destroy



      do not work.

        • 1. Re: Detect undeployment

          Have you considered a ServletContextListener?  It supports two methods:


          contextInitialized() and contextDestroyed().  In the impl of these methods you can execute initialization and cleanup code.


          Allen