Author: sebb Date: Mon Dec 8 10:57:40 2008 New Revision: 724446 URL: http://svn.apache.org/viewvc?rev=724446&view=rev Log: Integrate temporary work-round for BSF-22
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java?rev=724446&r1=724445&r2=724446&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java (original) +++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java Mon Dec 8 10:57:40 2008 @@ -38,12 +38,18 @@ public abstract class BSFTestElement extends AbstractTestElement implements Serializable, Cloneable { - private static final long serialVersionUID = 232L; + private static final long serialVersionUID = 233L; + + private static final Logger log = LoggingManager.getLoggerForClass(); static { BSFManager.registerScriptingEngine("jexl", //$NON-NLS-1$ "org.apache.commons.jexl.bsf.JexlEngine", //$NON-NLS-1$ new String[]{"jexl"}); //$NON-NLS-1$ + log.info("Registering JMeter version of JavaScript engine as work-round for BSF-22"); + BSFManager.registerScriptingEngine("javascript", //$NON-NLS-1$ + "org.apache.jmeter.util.BSFJavaScriptEngine", //$NON-NLS-1$ + new String[]{"js"}); //$NON-NLS-1$ } //++ For TestBean implementations only @@ -109,10 +115,10 @@ mgr.declareBean("OUT", System.out, PrintStream.class); // $NON-NLS-1$ // Most subclasses will need these: - SampleResult prev = jmctx.getPreviousResult(); - mgr.declareBean("prev", prev, SampleResult.class); Sampler sampler = jmctx.getCurrentSampler(); mgr.declareBean("sampler", sampler, Sampler.class); + SampleResult prev = jmctx.getPreviousResult(); + mgr.declareBean("prev", prev, SampleResult.class); } protected void processFileOrScript(BSFManager mgr) throws BSFException{ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]