tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: getting the request that created the session
Date Tue, 30 Apr 2013 14:20:55 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Leon,

On 4/27/13 5:08 PM, Leon Rosenberg wrote:
> is there any possibility to get the first request from a session
> (or any request from a session) from the HttpSessionListener. 
> Background, I want to count sessions by top level domains. I'm
> doing it now in a combination of filter and listener. Filter for
> new sessions, putting a mark for already counted sessions, and
> listener for destroyed session. However, I would like to get rid of
> the Filter, if its possible somehow. For that, I need to get user's
> ip adress somehow.

Back to the original issue: tracking sessions.

How often do you need to search these sessions for where they came
from? Perhaps it's enough to just mark each session with the first IP
address you knew about. I mean, how often does someone change IP
addresses during their session (under normal circumstances... yes,
proxies can play games, but it's probably not going to matter for your
uses, here).

Once you've marked each session, you could use JMX to enumerate the
sessions and then search for whatever you want. That might be a better
pattern for lots of different session-manipulation strategies, anyway.

As for this particular requirement (TLDs for session-creation), that's
a fairly narrow requirement that most people aren't going to have...
so they aren't going to enable that Filter. If they don't enable it,
it doesn't appear in the stack trace. Are you suggesting that you'd
enable this filter by default?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRf9NGAAoJEBzwKT+lPKRYky4QAJo3Lnw95VUQdaNHWZe+9lKM
8xvsPJ2mwi9QOML+IFGYG9cxpKVF5MT2W632V6IVlght5LGX98+mKmXTsT7Dzr0k
gVBKf8Fa4QGlhsEY3AXlTzIxpuFOAWj/iNT15osBTSV6g6aaUXB4QOmKfsLhJL4B
1IC5o5Q0KR5pHIL/g7zWDCZLph+HrarW5xhVwFyBqWkAusjOz9lqlzsFdd6J6zf5
bBWCwD6OQ7JpCsOEyvJ/7i9NXF2gq3a+V9o2exfCWsh7A+ESzYKJLCU3swZRu15x
NbNLDr3TBRmNkEXSIcoBH2Jl5mv1rpp69KfZDUjZQQZHXESIl+wNbpaOj4BqdSxp
QGPI4UYJ7E1to1GSqLhXF3OE0TGcrCsctVTAy1eGGbEeO/aik4PC3zmjCSPx42k+
xNz09uO+GUyyY5jC3qmNgBz+9qfdYmC2CHruEJwQVrZRPYWyNKjxo6ceA76xC16I
LCGTQrA3888UfmS2L0cZ7KFlbkwPMI0I1lQtK72OOeLSJ+mrMaGW8d45rrbOaYR5
2UC//e18IdYZCVbw4RYsybaiNZ24U6rpkfPMA012b1CKHSlpcsDMdEfag/LxM2tk
W4UaDYbbd9rf5Sy+r8a1iyYBYBcMZ27vTdsgPPdenoYefFd7ODwNvaUAEnMgU/DE
DSu2GTToTojiQvG7grAv
=eHuL
-----END PGP SIGNATURE-----

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


Mime
View raw message