tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <billwbar...@verizon.net>
Subject Re: [OT - question] Limit user sessions in tomcat
Date Wed, 16 Dec 2009 05:13:51 GMT

"Caldarale, Charles R" <Chuck.Caldarale@unisys.com> wrote in message 
news:99C8B2929B39C24493377AC7A121E21F9680850A99@USEA-EXCH8.na.uis.unisys.com...
>> From: André Warnier [mailto:aw@ice-sa.com]
>> Subject: Re: [OT - question] Limit user sessions in tomcat
>>
>> It would seem that there ought to be some low-level response-direction
>> socket flag that should be available, to tell whether the receiving end
>> has gone, without actually having to send anything from a higher-level
>> code module.  But getting to that low-level socket data does not seem
>> to be so easy in Java, is it ?
>
>It's not hard in Java (Socket.getRemoteSocketAddress() or 
>Socket.isConnected() should work), but there's nothing in >the servlet spec 
>that allows a servlet thread to obtain for that information.  Ideally, the 
>container (Tomcat) would >asynchronously monitor the socket status and set 
>some flag in the Request object for the webapp code to examine at >its 
>leisure.  Might also be able to implement this with a new form of listener.
>
>I haven't looked at the Servlet 3 spec to see if anything is in there for 
>this rather common problem.
>

The Servlet 3 spec has something close:  Asynchronous requests (which are 
sort of like Comet in TC 6).  It's more designed to allow the servlet to 
push content to the client (think a JavaScript progress bar).

> - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message