incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r898366 - /sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java
Date Tue, 12 Jan 2010 15:31:06 GMT
Author: cziegeler
Date: Tue Jan 12 15:31:06 2010
New Revision: 898366

URL: http://svn.apache.org/viewvc?rev=898366&view=rev
Log:
SLING-1284 : MemoryLeak: ThreadLocal variable is never cleared

Modified:
    sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java

Modified: sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java?rev=898366&r1=898365&r2=898366&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java
(original)
+++ sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java
Tue Jan 12 15:31:06 2010
@@ -191,8 +191,6 @@
 
         try {
             // prepare some classes
-            prepareJasperClasses();
-
             ioProvider = new SlingIOProvider(classLoaderWriter);
 
             tldLocationsCache = new SlingTldLocationsCache(slingServletContext,
@@ -303,24 +301,6 @@
         this.dynamicClassLoaderManager = null;
     }
 
-    private void prepareJasperClasses() {
-        final String propName = "org.apache.sling.scripting.jsp.jasper.runtime.JspFactoryImpl.USE_POOL";
-        final String propValue = System.getProperty(propName);
-        try {
-            // hacky wacky to prevent PageContext pooling !!!
-            System.setProperty(propName, "false");
-            jspClassLoader.loadClass("org.apache.sling.scripting.jsp.jasper.runtime.JspFactoryImpl");
-        } catch (Throwable t) {
-            // don't care for now
-        } finally {
-            if (propValue != null) {
-                System.setProperty(propName, propValue);
-            } else {
-                System.clearProperty(propName);
-            }
-        }
-    }
-
     // ---------- Internal -----------------------------------------------------
 
     private class JspScriptEngine extends AbstractSlingScriptEngine {



Mime
View raw message