From 53d9e069dce66215a3c794e84b3f12a3eb8e6da2 Mon Sep 17 00:00:00 2001 From: mdb Date: Thu, 1 Mar 2001 21:09:54 +0000 Subject: [PATCH] Added code to shut down our application objects when the servlet is shut down. git-svn-id: https://samskivert.googlecode.com/svn/trunk@61 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../com/samskivert/webmacro/DispatcherServlet.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/samskivert/src/java/com/samskivert/webmacro/DispatcherServlet.java b/projects/samskivert/src/java/com/samskivert/webmacro/DispatcherServlet.java index 9264cf29..403d2aad 100644 --- a/projects/samskivert/src/java/com/samskivert/webmacro/DispatcherServlet.java +++ b/projects/samskivert/src/java/com/samskivert/webmacro/DispatcherServlet.java @@ -1,5 +1,5 @@ // -// $Id: DispatcherServlet.java,v 1.3 2001/03/01 21:06:22 mdb Exp $ +// $Id: DispatcherServlet.java,v 1.4 2001/03/01 21:09:54 mdb Exp $ package com.samskivert.webmacro; @@ -178,6 +178,15 @@ public class DispatcherServlet extends WMServlet } } + public void stop () + { + // shutdown our applications + for (int i = 0; i < _apps.size(); i++) { + Application app = (Application)_apps.get(i); + app.shutdown(); + } + } + public Template handle (WebContext ctx) throws HandlerException { // first we select the template