2 Replies Latest reply on Feb 12, 2007 10:54 PM by Gavin King

    Security logout method

    Ricardo Memoria Novice

      Is there a way to configure a method of a component to be called when the user logs out or the user's session expires?

      Ricardo Memória

        • 1. Re: Security logout method
          Ben Catherall Newbie

          For logout, rather than calling identity.logout(), call your own method that either call's Identity.instance().logout(), or calls Seam.invalidateSession() - which at the moment is basically all identity.logout() does.

          For expiring sessions, presumably you already have a session scoped stateful component, i'd annotate a method in it with @Destroy (you'll already have one of these if you're using SFSBs)

          • 2. Re: Security logout method
            Gavin King Master


            (a) Add an @Destroy method to any session scope component (you may also need to annotate it as @Startup)


            (b) Add an observer to the event org.jboss.seam.preDestroyContext.SESSION