Thanks a lot for your response. What do you mean with ' load entirely a new set of jython classes? To load it with a different classloader for every execution?
Thanks,
          Juan Pablo

Leo User <leouser126@yahoo.com> escribió:
If I remember right, when I developed the JythonShell
for jyleo I had this problem where a new shell started
up would be able to reference the running jython
instance which is not what I wanted. What I did was
load an entirely new set of Jython classes per unique
instance I wanted. That gave me the separation I
wanted. Im not sure if loading a unique Jython per
invocation is a good idea for you, it seems far more
expensive than just synchronizing the darn thing.

leouser

--- Juan Pablo Carlino wrote:

> Hi,
>
> I'm having a strange problem with jython from long
> time ago. The error happens randomly and smells like
> jython internal race condition, but I'm not sure.
> I have read a post, in this mailing list which
> explains exactly the same problem I had during this
> time. The link is
>
http://sourceforge.net/mailarchive/message.php?msg_id=10134445
> Saddly for me, the issue appears to continue open.
>
> My application is a multi-threading workflow engine
> written in java which invokes jython scripts to
> evaluate conditions and to execute actions in the
> context of workflow instances.
> This application is really big, and actually manages
> a large volume of data, which impacts in the number
> of threads involved during normal usage.
> Every time a script must be evaluated, a new
> PythonInterpreter is built (by the way, I've tried
> two initialization styles: new PythonInterpreter()
> and also new PythonInterpreter(null, new new
> PySystemState()) )
> I have made a lot of tests, and when a big number of
> threads are executing scripts, sometimes, an
> execution crashes, with strange exception messages
> (things like mentioned in the previous link).
> If I synchronize statically the block of code where
> jython scripts are executed (in other words, I
> guaratee that only one script at a time can be
> executed) the problem disappears.
> Obviously, I have inspected my own java code to be
> sure that no race conditions exist during pre or
> post processing of jython invocation.
> So... any ideas?
> Thanks in advance,
>
> Juan Pablo
>
> PS: I'm using jython Release_2_2alpha1
>
>
> ---------------------------------
> Preguntá. Respondé. Descubrí.
> Todo lo que querías saber, y lo que ni imaginabas,
> está en Yahoo! Respuestas (Beta).
> Probalo ya! >
-------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support
> web services, security?
> Get stuff done quickly with pre-integrated
> technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1
> based on Apache Geronimo
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
_______________________________________________
> Jython-users mailing list
> Jython-users@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/jython-users
>


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users


Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
Probalo ya!