You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@apache.org on 2005/03/20 06:45:27 UTC

svn commit: r158305 - struts/shale/trunk/core-library/src/java/org/apache/shale/faces/ShaleApplicationFilter.java

Author: craigmcc
Date: Sat Mar 19 21:45:24 2005
New Revision: 158305

URL: http://svn.apache.org/viewcvs?view=rev&rev=158305
Log:
On application shutdown, call the relevant cleanup method for each library
used by the framework itself.  Applications that utiilze additional libraries
that might need to be cleaned up should do so themselves, in the destroy()
method of a Filter or the contextDestroyed() method of a
ServletContextListener.

Modified:
    struts/shale/trunk/core-library/src/java/org/apache/shale/faces/ShaleApplicationFilter.java

Modified: struts/shale/trunk/core-library/src/java/org/apache/shale/faces/ShaleApplicationFilter.java
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/java/org/apache/shale/faces/ShaleApplicationFilter.java?view=diff&r1=158304&r2=158305
==============================================================================
--- struts/shale/trunk/core-library/src/java/org/apache/shale/faces/ShaleApplicationFilter.java (original)
+++ struts/shale/trunk/core-library/src/java/org/apache/shale/faces/ShaleApplicationFilter.java Sat Mar 19 21:45:24 2005
@@ -31,6 +31,7 @@
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.beanutils.PropertyUtils;
 import org.apache.commons.chain.Catalog;
 import org.apache.commons.chain.CatalogFactory;
 import org.apache.commons.chain.Command;
@@ -185,12 +186,19 @@
 
         log.info(messages.getMessage("filter.finalizing"));
 
+
+        // Clean up JavaServer Faces integration linkages
         if (phaseListener != null) {
             getLifecycle().removePhaseListener(phaseListener);
         }
         phaseListener = null;
         context = null;
         catalog = null;
+
+        // Clean up subordinate libraries as needed
+        CatalogFactory.clear();
+        PropertyUtils.clearDescriptors();
+        LogFactory.release(Thread.currentThread().getContextClassLoader());
 
     }
     



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