Remy Maucherat wrote:
Remy Maucherat wrote:
Filip Hanik - Dev Lists wrote:
That's a second step :) It's a good idea because at the moment
there's only a boolean, so it's not possible to do anything except
sending an ERROR or READ event.
Right now, I'm doing all the changes in the servlet container (which
is enough to keep me busy for now, and is independent).
Looking at the event types and subtypes:
- BEGIN: ok, no problem
- READ: ok, no problem either
- END/WEBAPP_RELOAD: it's useful, but it will be expensive (and not
easy) to track which connection is associated with which webapp, and
to close them; there could be an option to do this sort of tracking
for people who would like to redeploy in production; I think the
tracking and cleanup would best be done by the servlet itself using a
listener
yes, this is a tricky one, let me think about it for a bit.
- END/SERVER_SHUTDOWN: already done, but as an error event; I think
the name should be changed to STOP or something, however, since only
the connector could be stopped
I'm ok with the name change.
- END/SESSION_END: ?; does this mean when the HTTP session expires ?
It's about the same as WEBAPP_RELOAD, then: useful, but expensive and
not easy to do (= another option); note also that the servlet can do
this sort of tracking by itself (it can have a map of the connection
and associated session, and use a session listener)
can't remember what I was thinking on this one.
- ERROR/TIMEOUT: no problem; there should be the possibility for the
servlet to not terminate the connection for that one (the connection
goes back to the poller with a brand new timeout value), however
- ERROR/CLIENT_DISCONNECT: ok, except on Windows with APR (a READ
event will be generated instead, and it will read an EOF); NIO may
have the same issue
I believe you are correct
- ERROR/IOEXCEPTION: I don't understand that one: I think people will
get an exception when reading invalid data, as usual
it was intended as a global catch all subtype. ie, if there is a poller
error. if data is invalid, then yes, read will throw ServletException or
IOException.
For some of these events, we could provide with Tomcat a set of
utility valves which would implement them, such as a connection
tracking valve (closes connections on reloads or when sessions expire).
agreed
got my hands full today, will sleep on it some more.
Filip
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]