Every servlet is HttpServlet so destroy() method resides in HttpServlet.
so you need to override that destroy() in your class and before shutting
down of your application server
instruction pointer of VM automatically enters into the overrided destroy()
method and if you write
resource cleaning algorigthm ,then algorithm will be execute.but if you
write infinite loop then control canot
get outside of destroy method and application server cant be shutting down.

hope this will help

On Mon, Mar 29, 2010 at 4:32 PM, Hamlet D'Arcy <hamlet...@gmail.com> wrote:

> I need to be notified when the server side of my GWT application is
> shutting down . Specifically, one of my RemoteServiceServlet
> subclasses is initializing a resource that must be properly released
> when the system shuts down (an ehcache cache to be exact).
>
> In other frameworks I have used, I was given a method to override or
> listener to implement that would call me back when the container was
> shutting down my app.
>
> Is anything like this available in GWT?
> Or should I try to wire in a Tomcat shutdown listener of some sort?
>
> Thanks in advance,
>
> Hamlet D'Arcy
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to