0 Replies Latest reply on Jan 18, 2010 9:24 PM by nimo stephan

    Using '@Destroy' or 'preDestroyContext.SESSION'

    nimo stephan Master

      Does anyone knows the difference of


      this:


      @Observer("org.jboss.seam.preDestroyContext.SESSION")
      @Transactional(TransactionPropagationType.REQUIRED)
      public void sessionDestroyed() {
      
      log.info("Date #0", new Date());
                      
      }




      and that:
             


      @Destroy
      public void destroy() {
              
      log.info("Date #0", new Date());
      }




      both logs the same date, so both are triggered at the same time - when should I use @Destroy and when 'org.jboss.seam.preDestroyContext.SESSION' ?