You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by pf...@apache.org on 2005/03/17 06:18:32 UTC
cvs commit: jakarta-tapestry/framework/src/org/apache/tapestry ApplicationServlet.java
pferraro 2005/03/16 21:18:32
Modified: framework/src/org/apache/tapestry Tag: branch-3-0
ApplicationServlet.java
Log:
Implements destroy() method of servlet to ensure that shared JanitorThread terminates.
TAPESTRY-230: Ignored interruptedException prevents Janitorthread termination.
Revision Changes Path
No revision
No revision
1.8.2.1 +18 -1 jakarta-tapestry/framework/src/org/apache/tapestry/Attic/ApplicationServlet.java
Index: ApplicationServlet.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/Attic/ApplicationServlet.java,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -r1.8 -r1.8.2.1
--- ApplicationServlet.java 19 Feb 2004 17:37:36 -0000 1.8
+++ ApplicationServlet.java 17 Mar 2005 05:18:32 -0000 1.8.2.1
@@ -39,6 +39,7 @@
import org.apache.tapestry.spec.IApplicationSpecification;
import org.apache.tapestry.util.DefaultResourceResolver;
import org.apache.tapestry.util.DelegatingPropertySource;
+import org.apache.tapestry.util.JanitorThread;
import org.apache.tapestry.util.ServletContextPropertySource;
import org.apache.tapestry.util.ServletPropertySource;
import org.apache.tapestry.util.SystemPropertiesPropertySource;
@@ -787,4 +788,20 @@
return _resolver;
}
+ /**
+ * Ensures that shared janitor thread is terminated.
+ * @see javax.servlet.Servlet#destroy()
+ * @since 3.0.3
+ */
+ public void destroy()
+ {
+ try
+ {
+ JanitorThread.getSharedJanitorThread().interrupt();
+ }
+ finally
+ {
+ super.destroy();
+ }
+ }
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org