Integrate GraalVM JS to script mediator #2196
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
$subject
This will replace existing rhinoJS and be an alternative to deprecated nashornJs.
Note: E4X is deprecated and it is not supported by GraalVM JS engine. To overcome this when using GraalJS, DOMparser can be used to parse XML strings rather than using XML objects. But then the users who are using
script mediator with the new GraalVM JS engine will not be able to use XML objects in javascript but they will be able to use setPayloadXML and getPayloadXML methods in script mediator by using string representations of XML.
To maintain backward compatibility, the existing rhinoJs engine is kept and it can be used by setting the language as "rhinoJs" in the script mediator syntax.
Example
Default "js" language will be utilizing the graalVM JS engine.
Example