On Sat, 9 Aug 2003, Remy Maucherat wrote: > Date: Sat, 09 Aug 2003 15:29:09 +0200 > From: Remy Maucherat <[EMAIL PROTECTED]> > Reply-To: Tomcat Developers List <[EMAIL PROTECTED]> > To: Tomcat Developers List <[EMAIL PROTECTED]> > Subject: [5.0] Listeners change > > 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 ? >
Makes sense, but don't forget that a listener class can implement more than one interface, so you might have to put the same instance on both lists. > Remy Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]