Forum: JRuby ScriptingContainer, Ruby Runtime and Variable Map

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
3a81ced4012650ca2004c9bff7b18202?d=identicon&s=25 Ronald F. (rovf)
on 2016-01-02 11:18
(Crossposting note: This question has also been posted at the JRuby
mailing list ( on December 20, and on
as well, but hasn't got any response yet).

This question is about understanding the impact of the LocalContextScope
parameter in the presence of multi-threading.

We can find at a
recipe which helps about choosing the best value for the
LocalContextScope parameter. This page explains, that this parameter
controls, whether ScriptingContainer and/or Ruby Runtime and/or Variable
Map is shared among threads. However, I would like to get a somewhat
deeper understanding to this issue, in particular, which part of the
"system" is implemented in which one of those three components.

For example, when I create global variables in Ruby, or new classes, or
functions and variables in the top level context, do they belong to the
ScriptingContainer, to the runtime, or to the variable map?  What if I
modify a standard class, for example, by adding a method - what needs to
be shared so that the changes will be visible everywhere?
This topic is locked and can not be replied to.