On 17/11/2009 04:14, Imad Hachem wrote:

Dear all,

I am using Tomcat-5.5.12 as Clustering nodes, and after one node
shutdown sessionDestroyed is called before contextDestroyed.

Are you still using 5.5.12? Hasn't anyone advised you to upgrade to a newer version yet?

I think it's perfectly reasonably to call sessionDestroyed() before contextDestroyed().

How can I know if sessionDestroyed is called from session.invalidate()
from the real expiration of the session or shutdown of one cluster node?

You can't know this directly from the Servlet API methods.

Note that on sessionDestroyed event, I am using a Logout behavior to
logout my users from the DATABASE.

I have tried to set a KEY on the context (or application scope) to check
> on it during the sessionDestroyed event, but it seems the context is
destroyed after the session destroy event.

This comes up not infrequently on the list, the archives have more information:

http://old.nabble.com/Re%3A-sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node-in-the-cluster-p16746969.html

Is there any event listener that I can use before the sessionDestroyed to 
differentiate if one cluster node has been shutdown or my session has been 
expired?

Or is how to configure the contextDestroy to be called before the sessions 
destroy?

No, contextDestroyed() means that the web application itself has been stopped, this is mandated by the Servlet Spec.


p


Thanks in advance for your help.

Best Regards,
Imad Hachem

System Engineer


                                        
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on 
Facebook.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009


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

Reply via email to