jexl

Are jexlscript objects thread safe


I know that the jexlengine and jexltemplate are thread safe so I can instantiate one instance for use throughout the system. However, are the jexlscript instances created via jexlengine.createscript(...) thread safe ? I googled this and can't find an answer. I appreciate your help.


Solution

  • Yes, JEXL scripts and the interpreter are thread-safe; the same script can be executed concurrently by different threads . However, the objects and methods called through the script must enforce their own thread-safety.