Closed
Description
ScriptingContainer with LocalContextScope.THREADSAFE share one instance of JRubyClassLoader with all runtimes. since each runtime loads it own set of jar files but they get shared by the shared JRubyClassLoader. for example each runtime can load its own version of bouncycastle jars which will result one classloader having all those BC jars loaded.
the real world problem is when a lot of thread startup with require 'openssl'
conditions can arise where some classes can not be loaded from the JRubyClassLoader: http://ruby.11.x6.nabble.com/JRuby-complete-multi-threading-and-java-lang-NoClassDefFoundError-td5004808.html
IMO each runtime should have its own JRubyClassloader to separate the set if required jars per runtime.