If one takes advantage of the new RexxScriptSupport in the context of JavaFX, for each FXML document the Java FXMLLoader creates an instance of a RexxScriptEngine, causing Rexx code to be executed in separate Rexx interpreter instances, which is working as designed.
However, if .BSF objects created in one RexxScriptEngine is stored in .environment and referred to by Rexx code executing in another Rexx interpreter instance, the lookup for the Java object will only return the Java string object that was used as the key to be used for the Java registry lookup.
Currently the Java registry takes advantage of Apache's Bean Scripting Framework (BSF) BSFManager's registry services, which are confined to individual Rexx interpreter instances. Cross-look-ups are not possible.
As ooRexx allows for sharing Rexx objects via .environment among all Rexx interpreter instances, using BSF objects placed in .environment should be fully usable as well, independent of the Rexx interpreter instance referring to it. Therefore this behaviour is regarded to be a bug and needs resolution ASAP.
Fixed in [r399], needs extensive testing.
Related
Commit: [r399]