On 15/12/2009 22:01, Caldarale, Charles R wrote:
From: André Warnier [mailto:a...@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.
Comet?
p
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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org