Hi Nicholas
By any chance do you have anything that I can test - I have the jython 2.5.1 jar. If you have the modified class files I can just add them in my local and do the test.
 
thanks
Anamitra

--- On Wed, 12/9/09, Anamitra Bhattacharyya <ana_mitra@yahoo.com> wrote:

From: Anamitra Bhattacharyya <ana_mitra@yahoo.com>
Subject: Re: [Jython-users] bug in jython jsr223 implemetation?
To: jython-users@lists.sourceforge.net, "Nicholas Riley" <njriley@illinois.edu>
Date: Wednesday, December 9, 2009, 2:33 PM


Hi Nicholas
that's great - I can definitely wait for couple of weeks - I would be more than willing to test the code that you fix whenever u are ready with it. I will try to code as per we discussed then [not having to implement a pool of CompiledScript is a great relief].
Thanks for your help - do pls let me know whenever u have it ready for a test.
 
thanks
Anamitra
--- On Wed, 12/9/09, Nicholas Riley <njriley@illinois.edu> wrote:

From: Nicholas Riley <njriley@illinois.edu>
Subject: Re: [Jython-users] bug in jython jsr223 implemetation?
To: jython-users@lists.sourceforge.net
Date: Wednesday, December 9, 2009, 1:53 PM

In article <462905.91284.qm@web112103.mail.gq1.yahoo.com>,
Anamitra Bhattacharyya <ana_mitra@yahoo.com> wrote:

> System.out.println(a+"+"+b+"="+cs.getEngine().get("c")); - u sould see 4+5=13
> and 2+3=9 etc instead of nulls. BTW the rhino implementation says its
> "MULTITHREADED" too and still is giving correct out for this test. So do you
> think what I am trying to do is not valid as per the jsr 223 spec? OR there
> is some problem with the jython implementation of jsr223. Because if its the
> former - then I will have to use a pool of CompiledScript objects and that
> significantly complicates the implementation. If its the latter then I am
> ready to make an exception for jython and code to the jython api ditching
> jsr223 for jython - if u say the jython apis [PythonInterpreter etc] would
> work for this. All I want
>  to achieve is -
>  
> 1>compile a script and cache it
> 2>have multiple threads execute that and I use the Binding object as my
> transport for IN and OUT params to the script.

It's just a problem with the Jython implementation the JSR 223 (and
PythonInterpreter, for that matter) front ends.  There's nothing in
Jython itself that stops this from working.  At the time I was working
on the JSR 223 implementation, I didn't understand the use case you are
describing.  Now I do and I'll handle it.

If you can wait a couple of weeks I will get it fixed, otherwise I
suggest you just create your own per-thread locals/global Python
dictionaries (which are what the Bindings end up getting mapped to) and
use them.  If you look at the source code for PythonInterpreter it
should be clear what to do, otherwise please ask on the list.
--
Nicholas Riley <njriley@illinois.edu>


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users


-----Inline Attachment Follows-----

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev

-----Inline Attachment Follows-----

_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users