tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex79 <asoar...@gmail.com>
Subject RE: Problem with session
Date Wed, 10 Oct 2007 16:31:52 GMT

Hi,

I finally found out what the problem was. There is nothing stored in the
session (I tried the SessionListener from tomcat 5.5.25 in my tomcat
version, it worked - I saw contextInitialized entries in the standard
context log) but I never saw any sessioncreated - nor destroyed - event. By
checking the source code I saw that the session (or cache) is represented as
a LinkedHashMap with an overriden removeEldestEntry method that returns true
to remove eldest entry when the size > 1000. The problem was in the client
app where some type of request would generate a new random session id at
each request. So after sending 1000+ of this type of request, the cache had
lost any other info on previous active sessions. I did not know that one of
the request would generate a new id each time...

Thanks for your help, now at least I am a bit less newbie with tomcat ;)



Caldarale, Charles R wrote:
> 
>> From: Alex79 [mailto:asoares1@gmail.com] 
>> Subject: RE: Problem with session
>> 
>> You mentionned a session listener, can you point me out to a 
>> tutorial on how to do it?
> 
> See section 10 of the Servlet spec.
> 
>> Are there any generic session listener that I could use out
>> of the box?
> 
> There's one in the 5.5.25 distribution:
>  
> webapps/servlets-examples/WEB-INF/classes/listeners/SessionListener.java
> (I don't have 5.0 around anymore, but I would expect it to be in there
> as well.)
> 
> Look in:
>   webapps/servlets-examples/WEB-INF/web.xml
> to see how to configure it.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-session-tf4585082.html#a13139330
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Mime
View raw message