From: Ivan P. <ipo...@ma...> - 2015-08-28 12:22:28
|
Hello, We develop an open source project, using Jython as a script interpretation tool. Our application uses a pool of PythonInterpreter objects to facilitate multi-user work in web application. After upgrading to Jython version 2.7 we faced the following critical problem. In version 2.5, in order to create new PythonInterpreter each time we needed one more we used the following: new PythonInterpreter(null, new PySystemState()) Due to changes in version 2.7 we had to change to new PythonInterpreter(null, Py.getSystemState()) as previous method failed to work properly (random packages were reported as missing). Now the problem is that each time we change a Jython script file it is not enough to clear a pool of PythonInterpreters anymore to get things work the new way. We need to restart the whole Java application because PySystemState returned by Py.getSystemState() apparently caches the previous version of compiled byte code. Restarting the application takes up to several minutes, but we have to change the scripts 'on the fly'. If we had a proper method of resetting PySystemState it would have solved our problem. But we don't have one, e. g. see an open issue http://bugs.jython.org/issue2053. Could you comment, if you are going to solve the problem. Maybe we could help you to solve it. Regards, Ivan Ponomarev, PhD Course-IT LLC. |