On Thu, Mar 5, 2009 at 4:19 PM, Endre Stølsvik <[email protected]> wrote:

>
> (This did apparently not reach the list, so I'll try from the webui)
>
> On Mar 3, 8:08 am, "Dhanji R. Prasanna" <[email protected]> wrote:
> > Well, I don't particularly find them useful. Most of the startup or
> shutdown
> > logic can be encapsulated in the filter's (or servlet's) init() and
> > destroy().
> >
> > No one has made a compelling argument about why we should support
> > ServletContextListeners. That is not to say there isn't one. Do you have
> a
> > use case?
> >
>
> Some cents:
> I thought that the init/destroy on servlets (and filters too?) should
> not be used for application startup and shutdown logic, as they per
> specification CAN be invoked several times throughout an application's
> lifecycle (to take down a servlet that hasn't been used for an hour).


No, are you referring to SingleThreadModel perhaps?

Common servlets aren't discarded and restarted--there's too much code out
there which relies on them hanging on to state.


>
> That no servlet container ever have done a destroy() on a servlet
> unless it takes down the entire application doesn't mean that it is a
> safe way to do app lifecycle.


It is called on webapp redeploy too. So it's fine. Also curious--why is it
unsafe to take down the entire app as a shutdown hook?

Dhanji.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to