[infinispan-issues] [JBoss JIRA] (ISPN-6131) ScriptingManager.removeScript throws ISPN026005 exception when the script exists
Anna Manukyan (JIRA)
issues at jboss.org
Wed Feb 10 04:02:00 EST 2016
[ https://issues.jboss.org/browse/ISPN-6131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13160927#comment-13160927 ]
Anna Manukyan commented on ISPN-6131:
-------------------------------------
UPDATE:
After 7d0aa92 commit pushed, the exception is not thrown any more. But when removing an existent script, it is only removed from the compiled scripts. The script is still present in the Script cache.
The same situation refers to the clear() action on Script cache. When the command given below is called, the cache is not cleared only the compiled scripts map is cleared.
{code}
cacheManager.getCache(ScriptingManager.SCRIPT_CACHE)
{code}
> ScriptingManager.removeScript throws ISPN026005 exception when the script exists
> ---------------------------------------------------------------------------------
>
> Key: ISPN-6131
> URL: https://issues.jboss.org/browse/ISPN-6131
> Project: Infinispan
> Issue Type: Bug
> Reporter: Anna Manukyan
> Assignee: Tristan Tarrant
>
> ScriptingManager.removeScript() method call with existing script name throws following exception:
> org.infinispan.commons.CacheException: ISPN026005: No script named 'test.js'
> at org.infinispan.scripting.impl.ScriptingManagerImpl.removeScript(ScriptingManagerImpl.java:121)
> at org.infinispan.scripting.ScriptingTest.testRemovingScript(ScriptingTest.java:61)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> ...
> The test code for script removing is:
> {code:java}
> public void testRemovingScript() throws Exception {
> assertNotNull(cacheManager.getCache(ScriptingManager.SCRIPT_CACHE).get("test.js"));
> scriptingManager.removeScript("test.js");
> assertNull(cacheManager.getCache(ScriptingManager.SCRIPT_CACHE).get("test.js"));
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the infinispan-issues
mailing list