From: Timur M. <tim...@we...> - 2005-07-19 12:35:38
|
Hello Brian. It is possible to simply replace version 2.1 of jython.jar with version 2.2 alpha 1. And it just works! But I still have a problem and I was hoping that the new release would provide a solution for it. We actually talked about this a while back already. But let me recap: I am using an OSGI container (Oscar) to run multiple services (some of them Jython scripts) in a single VM. In this environment, exiting a Jython script does not mean, that the JVM will be exited. The problem is, that Jython does not let go of any dynamic Java bindings, when a script is exited (only when the JVM is shut down). In the context of an OSGI container, I can stop an application, modify it (change Jython and/or Java code), reload the updated service into the VM and start it again. When Jython is involved, the OSGI activator (a pure Java class) executes a Jython interpreter. And the Jython script may then instantiate other Java classes. However, once a Java binding has been created, it will stay there until the VM will be shut down. When such a Java classes will be modified, my Jython scripts will not 'see' the modified version, since the Jython interpreter will forever stick with the first bound version of the class (even if these classes should not even be in memory anymore). Sorry for the winded explanation. Last time you said this: > Yes, part of the problem is getting the classes reloaded but the > use of weak hash maps should help solve this problem. I haven't > been able to fully test this problem and I'm focusing on the design > for import to be rewritten. I don't know a full solution at the > moment with the current implementation. But I was not able to solve the problem myself yet. Is there maybe a way out now? Thank you. Timur On 18. Jul 2005, at 03:18, brian zimmer wrote: > There is a new release of Jython available at Sourceforge: > > http://sourceforge.net/project/showfiles.php?group_id=12867 > > This release includes many major changes since the last full release: > > - new-style classes > - Java Collections integration > - PEP 302 implementation > - iterators > - generators > - __future__ division > - support for running on JDK1.5 > - new installer > - a significant number of features to bring Jython in line with > CPython > - many, many bugfixes > > It was compiled a OS X with JDK1.4 but should run on JDK 1.2 +. > > The full set of changes are too numerous to list in detail. Please > consult > the sourceforge tracker for all closed issues since the last release. > > This version of Jython has support for most of Python 2.2 and numerous > features from Python 2.3 and beyond. A more comprehensive list > will be > forthcoming. > > Please email jyt...@li... with questions. > > thanks, > > The Jython Development Team > > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-dev > |