STAX 3.5.0 and later uses and installs Jython 2.5.2. Jython 2.7 is currently being developed (http://www.jython.org) and this feature is to change STAX to use Jython 2.7 (as well as the Cron and EventManager services that also use STAF's shared Jython model).
Jython 2.7 brings up the language level compatibility with the 2.7 version of CPython. This Jython version focuses largely on CPython compatibility, and so this release of Jython can run more pure Python apps then any previous release.
This was requested by Moss Uchida (WebSphere Performance Test) as a fix was added in Jython 2.7beta1 for bug #1327, "Classloaders cannot GC, which exhausts permgen" as they are hitting a OOM error with permgen.
I was able to build STAX with Jython 2.7.0b1 after downloading the Traditional Installer file and installing it (selected Installation Type: Standard and specified a Java 6 directory). I renamed the C:\dev\sf\obj\win32\staf\retail\lang\jython and C:\dev\sf\rel\win32\staf\retail\lib\jython directories to jython252 to remove the STAF Jython 2.5.2 files before building the jython and stax projects.
I successfully ran STAFTest using the new STAX.jar file to verify it it seems to be working (though more testing will have to be done in the future). Jython 2.7.0b1 requires Java 6 or later, so this new STAX.jar file requires Java 6 or later as I had to compile STAX using Java 6 instead of Java 5 in order to build STAX with Jython 2.7.0b1. I provided this updated STAX.jar file (V3.6.0 Alpha 1) to Moss Uchida, but he said that it did not resolve the OOM issue they are seeing.
Build changes needed:
export JAVA_V12_ROOT=/cygdrive/c/tools/ibmjava60
export JYTHON_ROOT=C:/tools/jython2.7b1
Code changes needed:
- services/stax/service/Manifest.MF: Change Jython-Version to 2.7.0b1-staf-v1
- services/stax/service/STAX.java: Change to new major STAX version (3.6.0)
- lang/java/service/STAFSharedJython.java: Change comment to new STAX Jython-Version
Documentation changes needed:
- Update STAX User Guide to document that STAX now requires Java 6 or later (instead of Java 5 or later)
I was able to compile STAX with Jython 2.7.x support. I did some quick test and it seems to work. Please provide feedback for any issues
I can't upload here due to attachment file restrictions but you should be able to download form the following link:
https://sourceforge.net/projects/stafmisc/files/stax/STAX_0_0_0.zip/download