On 2/10/2018 12:32 AM, Emi wrote:
> Hello Yasser,
>> You can write your own listener by implementing HttpSessionListener
>> and call shutdown in it's `sessionDestroyed` method. Please see [1].
>> [1] http://www.myjavarecipes.com/tag/session-timeout-handling-in-java/
> In HttpSessionListener, it seems that there are no session attributes
> anymore. So, there is no way for me to do the following in the listener
> class:
> 
> fixPool = session.getAttribute('fixpool_name');
> fixPool.shutdown();
> 
> So, the only possible way is through springframework config, right?

Hello Emi,

The documentation says "Receives notification that a session is about to
be invalidated" at [1] i.e. "it's about", so still should be accessible
(please try HttpSessionEvent.getSession of it's parameter to see).
Please also consider when you call session.invalidate in logout, then
this method also may being called also.

Sincerely,
Yasser.

[1]
https://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpSessionListener.html


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to