ovidiu 02/03/13 19:51:14 Modified: src/scratchpad/schecoon/src/org/apache/cocoon/components/flow JavaScriptInterpreter.java Log: Don't store the Environment and InvokeContext objects in the instance. Revision Changes Path 1.2 +2 -21 xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/JavaScriptInterpreter.java Index: JavaScriptInterpreter.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/JavaScriptInterpreter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JavaScriptInterpreter.java 13 Mar 2002 19:10:35 -0000 1.1 +++ JavaScriptInterpreter.java 14 Mar 2002 03:51:14 -0000 1.2 @@ -19,18 +19,14 @@ import org.mozilla.javascript.Scriptable; public class JavaScriptInterpreter extends AbstractLoggable - implements Interpreter, Initializable, Composable, ThreadSafe + implements Component, Interpreter, Initializable, Composable, ThreadSafe { Scriptable scope; - Environment environment; - InvokeContext invokeContext; ComponentManager manager; public void initialize() throws Exception { - System.out.println("entering initialize: " + this); - org.mozilla.javascript.Context context = org.mozilla.javascript.Context.enter(); context.setCompileFunctionsWithDynamicScope(true); @@ -41,9 +37,6 @@ context.exit(); throw e; } - - System.out.println("exiting initialize: this " + this - + ", scope = " + scope); } public void compose(ComponentManager manager) @@ -57,14 +50,9 @@ } public void callFunction(String funName, Parameters params, - Environment env, InvokeContext ctx) + Environment environment, InvokeContext ctx) throws Exception { - // Remember the environment and the context for later, when the - // script will call the pipeline processing function. - this.environment = env; - this.invokeContext = ctx; - org.mozilla.javascript.Context context = org.mozilla.javascript.Context.enter(); context.setCompileFunctionsWithDynamicScope(true); @@ -104,12 +92,6 @@ threadScope.delete("request"); threadScope.delete("response"); threadScope.delete("interpreter"); - - // At the end of the function processing, reset the environment - // and invoking context. - this.environment = null; - this.invokeContext = null; - context.exit(); } } @@ -119,4 +101,3 @@ { } } -
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]