Forum: JRuby jsr223 legacy behaviour

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
017f56208634d223c1ba00eb42c08b83?d=identicon&s=25 Francesco Malvezzi (Guest)
on 2015-01-29 12:07
(Received via mailing list)
hi all,

I have to write a jsr223 jruby script for the attribute resolver of
shibboleth-idp
(https://wiki.shibboleth.net/confluence/display/IDP...).

I'm a bit lost to get right the Context Instance Type switches from
https://github.com/jruby/jruby/wiki/RedBridge.

My problem is:
 container inject variables as constants, and different concurrent
invocations of a script overwrite each other data.

Well, I believe it's something related with the Context Instance Type,
but maybe I'm wrong.

What I can say for sure is that the jruby scripts work fine with
jruby-1.0.0.jar and a legacy jruby-engine-20080611.jar.

Which configurations let a modern jruby.jar to work in emulation of the
jsr223 behaviour of jruby-engine-20080611?

thank you,

Francesco
E184bc2347f90dd61b509de6eb43a8b6?d=identicon&s=25 Yoko Harada (Guest)
on 2015-01-29 18:03
(Received via mailing list)
Hi Francesco,

Context Type: SingleThread
Variable Behavior: Global Local

should work the same as jsr223  reference implementation,
jruby-engine-20080611.

Defaults are Singleton and Transient, so you need to explicitly specify
the
values. But, global local variable behavior is set when JSR223 engine is
instantiated as far as I know.

Hope this helps,
- Yoko

On Thu, Jan 29, 2015 at 6:05 AM, Francesco Malvezzi <
017f56208634d223c1ba00eb42c08b83?d=identicon&s=25 Francesco Malvezzi (Guest)
on 2015-01-30 08:38
(Received via mailing list)
Il 29/01/15 17:59, Yoko Harada ha scritto:
> engine is instantiated as far as I know.
>
> Hope this helps,
> - Yoko

Are these the correct settings according to your kind response?

jetty    28117  9.7 40.5 2776288 835200 ?      Sl   08:18   1:28
/usr/bin/java -Xmx1024m -XX:MaxPermSize=128m
-Dorg.jruby.embed.localcontext.scope=singlethread
-Dorg.jruby.embed.localvariable.behavior=global
-Didp.home=/opt/shibboleth-idp -Djetty.home=/opt/jetty
-Djetty.base=/opt/jetty-base -Djava.io.tmpdir=/opt/jetty-base/temp -jar
/opt/jetty/start.jar jetty-started.xml
start-log-file=/opt/jetty-base/logs/start.log

If yes, unfortunately, it does not fix my issue:
globals carry on getting overwritten.

Thank you,

Francesco
This topic is locked and can not be replied to.