tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chema <demablo...@gmail.com>
Subject Re: Sharing session between different webapps under same tomcat
Date Sat, 06 Aug 2011 10:54:02 GMT
Hi Ron:


> My understanding is that once these options are confgured, the SAME session
> data is stored across contexts separately for each user.

Thanks for you answer, but in the last seccion of that webpage
(Session-aware cross context data sharing), explains that:

- he's sharing data using ServletContext. Its scope is the application
scope, not the session scope.
- to make it session-aware , he creates a hashmap in application scope
, indexing by JSESSIONID

So, it's a trick: use the session1's ServletContext as a global store
and access to it from session2, cause crossContext="true"
Works but it's a trick because it's not managed by Tomcat

> There is no need to
> do anything special - the session will be explicitly invalidated when the
> user logs out, otherwise when the session timeout is exceeded.

If I dont free resources from this hashmap manually when a session is
invalidated, Tomcat doesn't ( except when restarting )
That can be a problem if store big objects, like user information


Regards

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


Mime
View raw message