incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1068960 - in /sling/trunk: bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java contrib/scripting/java/src/main/java/org/apache/sling/scripting/java/impl/JavaScriptEngineFactory.java
Date Wed, 09 Feb 2011 16:26:54 GMT
Author: fmeschbe
Date: Wed Feb  9 16:26:53 2011
New Revision: 1068960

URL: http://svn.apache.org/viewvc?rev=1068960&view=rev
Log:
SLING-1975 Declare multi-threading behaviour of script engines:

   JSP: Stateless
   Java: Stateless
   JavaScript (Rhino): Multithreaded

Modified:
    sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/JspScriptEngineFactory.java
    sling/trunk/contrib/scripting/java/src/main/java/org/apache/sling/scripting/java/impl/JavaScriptEngineFactory.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=1068960&r1=1068959&r2=1068960&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
Wed Feb  9 16:26:53 2011
@@ -37,7 +37,6 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.SlingConstants;
 import org.apache.sling.api.SlingException;
-import org.apache.sling.api.SlingIOException;
 import org.apache.sling.api.SlingServletException;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.scripting.SlingBindings;
@@ -149,6 +148,17 @@ public class JspScriptEngineFactory
     }
 
     /**
+     * @see javax.script.ScriptEngineFactory#getParameter(String)
+     */
+    public Object getParameter(String name) {
+        if ("THREADING".equals(name)) {
+            return "STATELESS”";
+        }
+
+        return super.getParameter(name);
+    }
+
+    /**
      * @param scriptHelper
      * @throws SlingServletException
      * @throws SlingIOException

Modified: sling/trunk/contrib/scripting/java/src/main/java/org/apache/sling/scripting/java/impl/JavaScriptEngineFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/scripting/java/src/main/java/org/apache/sling/scripting/java/impl/JavaScriptEngineFactory.java?rev=1068960&r1=1068959&r2=1068960&view=diff
==============================================================================
--- sling/trunk/contrib/scripting/java/src/main/java/org/apache/sling/scripting/java/impl/JavaScriptEngineFactory.java
(original)
+++ sling/trunk/contrib/scripting/java/src/main/java/org/apache/sling/scripting/java/impl/JavaScriptEngineFactory.java
Wed Feb  9 16:26:53 2011
@@ -124,7 +124,19 @@ public class JavaScriptEngineFactory
     }
 
     /**
+     * @see javax.script.ScriptEngineFactory#getParameter(String)
+     */
+    public Object getParameter(String name) {
+        if ("THREADING".equals(name)) {
+            return "STATELESS”";
+        }
+
+        return super.getParameter(name);
+    }
+
+    /**
      * Activate this engine
+     *
      * @param componentContext
      */
     @SuppressWarnings("unchecked")



Mime
View raw message