Bug 47952 - JSR-223 (ScriptEngine) support
JSR-223 (ScriptEngine) support
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
unspecified
All All
: P2 enhancement (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2009-10-07 02:00 UTC by Pierre Queinnec
Modified: 2010-06-28 14:03 UTC (History)
0 users



Attachments
Proposed diff (3.61 KB, application/octet-stream)
2009-10-07 02:01 UTC, Pierre Queinnec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Queinnec 2009-10-07 02:00:38 UTC
Hi, we (Zenika, http://www.zenika.com) would like to contribute a JSR-223 (ScriptEngine) PreProcessor, PostProcessor and Listener. Of course this means running on JDK 6, so that's probably a problem for the patch build integration, and so on. I'm opening this enhancement request so that the code doesn't get lost.

Tell me if you think we could rework this. Thanks!
Comment 1 Pierre Queinnec 2009-10-07 02:01:53 UTC
Created attachment 24353 [details]
Proposed diff
Comment 2 Sebb 2009-10-08 14:32:00 UTC
Apache BSF3 is an implementation of JSR-223 which runs on Java 1.4, so the restriction of Java 1.6 is not a problem. 

From a brief look, the proposed new code does not itself require Java 1.6.

Thanks for the contribution - I hope to find time to add it to JMeter soon.
Comment 3 Sebb 2009-10-23 11:08:24 UTC
Added to SVN.

URL: http://svn.apache.org/viewvc?rev=829133&view=rev
Log:
Bug47952 - Initial JSR223 test element implementation

I had to make a few changes, e.g. if the script implementation is not found, it does not default to Groovy:

URL: http://svn.apache.org/viewvc?rev=829144&view=rev
Log:
Unused imports
Tidy error handling

URL: http://svn.apache.org/viewvc?rev=829145&view=rev
Log:
Unused imports
Wrong items being passed to script parameters

URL: http://svn.apache.org/viewvc?rev=829146&view=rev
Log:
Unused imports
Ensure file is always closed
Use correct eval() method
Don't default to Groovy engine
Don't continue if implementation is not found
Comment 4 Milamber 2010-06-27 13:56:07 UTC
Hello,
Before next release, don't forget to add BSF jar to 3.x in JMeter.
Now (6/27/2010), don't works with jdk1.5
Comment 5 Sebb 2010-06-28 14:03:28 UTC
(In reply to comment #4)
> Hello,
> Before next release, don't forget to add BSF jar to 3.x in JMeter.
> Now (6/27/2010), don't works with jdk1.5

Good point. 

Either need to include the jar or document that it is needed for Java 1.5.

Decided to include the jar.