nashorn - Immutable Global objects for multi-tenancy -


we run multi-tenant environment users can execute arbitrary scripts using nashorn. performance extremely important us, rather not create new simplescriptcontext object (or new simplebindings object) on each script eval.

however, leaves open people modifying global context, must reused other users / executions. e.g. math.min = function(a,b) { return 42; }.

freezing math object partial solution, seems slow down script execution, , have extremely diligent make sure everywhere. similarly, creating new simplebindings object replace engine_scope bindings on each execution big performance hit.

are there options available lock global state? or haven't thought of?

thanks!


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

android - Pass an Serializable object in AIDL -