tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject [5.0] Listeners change
Date Sat, 09 Aug 2003 13:29:09 GMT
Right now, all the webapp events are put in a single array. As some 
events are invoked in the critical path, this is not very efficient. The 
model was designed for Tomcat 4.0, with the old servlet API in mind, and 
it obviously used the fact that few events were sent.

As a result, I propose splitting the listeners in two arrays, so:

applicationListeners ->

1) applicationLifecycleListeners: lifecycle of the webapp and session 
(relatively low even rate)

2) applicationEventListeners: everything else (session and request 
modification, notification of request creation and destruction, etc)

The most important is that using a listener for lifecycle is very common 
(and a very good practice IMO), and shouldn't have a performance hit, 
while the second category would be used for fine control or in debug mode.

Comments ?

Remy



Mime
View raw message