cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 6164] New: - CocoonServlet destroy classloader problem
Date Thu, 31 Jan 2002 19:44:16 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6164>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6164

CocoonServlet destroy classloader problem

           Summary: CocoonServlet destroy classloader problem
           Product: Cocoon 2
           Version: 2.0
          Platform: Other
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: core
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: kesha@cosite.com


I'm using Cocoon with orion server. This server has a very neat feature that 
allows you to set up a timeout attribute for your web application, meaning that 
when this time's passed orion will unload you web app and as a result will 
invoke destroy method of all servets declared in your web-app. I've noticed the 
following problem. CocoonServlet sets its thread context classloader in the 
beginning of the service method, but it is not setting it in the beginning of 
the destroy method which results in the improper Cocoon servlet destruction. 

Here is the patch:

RCS file: /home/cvspublic/xml-
cocoon2/src/java/org/apache/cocoon/servlet/CocoonServlet.java,v
retrieving revision 1.4
diff -u -r1.4 CocoonServlet.java
--- CocoonServlet.java	31 Jan 2002 17:01:16 -0000	1.4
+++ CocoonServlet.java	31 Jan 2002 19:39:19 -0000
@@ -316,6 +316,10 @@
      */
     public void destroy()
     {
+        try {
+            Thread.currentThread().setContextClassLoader(classLoader);
+        } catch (Exception e){}
+
         if (this.cocoon != null)
         {
             if (log.isDebugEnabled()) {

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message