Don Srinath
Don Srinath

Reputation: 1593

Vaadin SessionDestroyListener session access

Is it possible to access session attributes inside the Vaadin SessionDestroyListener ? Or is it called after session getting destroyed ? How the call back order regarding to HttpSessionListener, before or after ?

Upvotes: 1

Views: 390

Answers (1)

Octavian Theodor
Octavian Theodor

Reputation: 673

While the session object is available by calling sessionDestroyEvent.getSession(), its state is CLOSING and all attributes have already been removed from it (rather simple to test this...).

EDIT

@Morfic is completely right, so he gets the credit: when in a SessionDestroyListener's sessionDestroy() method, the session's attributes are, indeed, still available (I was not careful in my tests; re-did them, using the latest Vaadin release, 8.0.4).

Upvotes: 1

Related Questions