Jsr223 legacy behaviour

hi all,

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

I’m a bit lost to get right the Context Instance Type switches from
RedBridge · jruby/jruby Wiki · GitHub.

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

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 <

Il 29/01/15 17:59, Yoko H. 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