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

    Using '@Destroy' or 'preDestroyContext.SESSION'

    nimo22

      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' ?