views:

39

answers:

2

greetings all i have an application which are made with Spring framework and deployed on apache,tomcat and i see on tomcat manager that there are many un-used sessions in the application and i want to trace when this session are created and who is creating them, how to do so ?

+1  A: 

You could install either LambdaProbe or it's fork PSIProbe which will give you details such as this. Both are open source products and usage is very similar to the Tomcat Manager.

LambdaProbe does not seem to be maintained any more. But see the session list screenshot for PSIProbe, you can see the Age and IP of each session.

http://psi-probe.googlecode.com/svn/wiki/Features/session-list.png

JoseK
+1  A: 

Make a HttpSessionListener, register it in web.xml (or with annotations, if using servlet 3.0).

the sessionCreated(..) method is triggered whenever a session is created.

Bozho

related questions