]
Anna Manukyan updated ISPN-6300:
--------------------------------
Affects Version/s: 8.1.2.Final
Parameters, CacheManager and Marshaller are not passed to JavaScript
in case of mode=distributed
------------------------------------------------------------------------------------------------
Key: ISPN-6300
URL:
https://issues.jboss.org/browse/ISPN-6300
Project: Infinispan
Issue Type: Bug
Components: Tasks
Affects Versions: 8.1.2.Final
Reporter: Anna Manukyan
When in javascript file the mode is set to distributed, the cacheManager, marshaller and
parameters are not passed from the server.
{code}
// mode=distributed,language=javascript,parameters=[a]
cache.put("a", a)
cacheManager.getAddress()
{code}
Java Call:
{code}
CompletableFuture<ArrayList<JGroupsAddress>> resultsFuture =
scriptingManager.runScript("distExec.js", new
TaskContext().cache(cache(0)).addParameter("a", "value"));
{code}
The following line execution throws:
{code}
Caused by: <eval>:3 ReferenceError: "a" is not defined
or
"cacheManager" is not defined if the cache put is commented.
{code}