1 Reply Latest reply on Dec 26, 2007 5:47 PM by pmuir

    @Destroy not called on logout

    pdpantages

      Seam 1.2.1GA,

      Hello forum, I have noticed that debug statements I put in my components @Destroy method are not usually called when the user logs out. These are usually SFSB, Conversational objects, scope SESSION and CONVERSATION.

      When the user logs out I call
      Seam.invalidateSession(), and
      identity.logout

      If I destroy a conversation with the workspaces "destroy" button, I see my messages printed, but the behaviour is different if you logout.

      It make no difference if I use the logger or System.out.println to emit the messages.

      Is this the expected behaviour? The manual just says the method is called when the context is ended and does not distinguish between logout and other cases. I am trying to find a memory leak and wondered if this indicated any sort of problem.

      I turned up Seam debug & traced a component I have called "dashboard". The first traces are due to a logout, the second from ending the conversation with the destroy button. The INFO log only appears in the latter.

      destroying: dashboardList
      destroying: dashboard
      Processing event:org.jboss.seam.preDestroy.dashboard
      intercepted: dashboard.destroy
      intercepted: dashboard.destroy
      Processing event:org.jboss.seam.preSetVariable.dashboard
      Processing event:org.jboss.seam.postSetVariable.dashboard
      intercepted: dashboard.PRE_DESTORY
      Processing event:org.jboss.seam.preRemoveVariable.dashboard
      Processing event:org.jboss.seam.postRemoveVariable.dashboard
      Stateful component was removed: dashboard
      

      destroying: dashboardList
      destroying: dashboard
      Processing event:org.jboss.seam.preDestroy.dashboard
      intercepted: dashboard.destroy
      intercepted: dashboard.destroy
      Processing event:org.jboss.seam.preSetVariable.dashboard
      Processing event:org.jboss.seam.postSetVariable.dashboard
      injecting dependencies of: dashboard
      2007-12-08 21:19:44,390 INFO [http-0.0.0.0-8080-2] centina.sa.client.network.DashboardBean
      Client: [dashboard] (23) Destroy
      outjecting dependencies of: dashboard
      Processing event:org.jboss.seam.preSetVariable.dashboardList
      Processing event:org.jboss.seam.postSetVariable.dashboardList
      disinjecting dependencies of: dashboard
      intercepted: dashboard.PRE_DESTORY
      Processing event:org.jboss.seam.preRemoveVariable.dashboard
      Processing event:org.jboss.seam.postRemoveVariable.dashboard
      Stateful component was removed: dashboard
      


      Thank you kindly for any info....

      PdP

        • 1. Re: @Destroy not called on logout
          pmuir

          I checked the source for 2.0.0 (but I can't see why it would be different in 1.2.1) and it should call the destroy method. If you can replicate this in an example or a simple seam-gen'd app, please create JIRA issue so we can take a look.