On Apr 8, 2005 1:40 PM, Craig McClanahan <[EMAIL PROTECTED]> wrote: > > The servlet container is *not* required to leave your load-on-startup > servlet loaded for the entire duration of the webapp's lifetime > (although, in practice, most containers do). For example, the > container could unload a servlet that it sees isn't being used, or if > it has memory contention issues, or for whatever reason is desired. > > Of course, if you're talking about ActionServlet, it will get reloaded > again on the next request, but that will cause your init() method to > run again -- wasting a whole bunch of time in many cases. > > A ServletContextListener, on the other hand, guarantees that > contextInitialized() will get called at startup time (before any > requests have been processed), and contextDestroyed() will get called > at shutdown time (after the last request), no matter what happens in > between. > > Craig >
Craig, Thanks for the information about ServletContextListener. But I wonder what you do to reload updated data from database without restarting using ServletContextListener. Have another action to call it reload() like Matt Riable said? Christine --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

