|
From: Erik R. J. <er...@ne...> - 2007-07-20 22:20:12
|
Attached is my initial stab at integrating spring scripting support and Jython if anyone is interested. Jython 2.2rc2 was used for development and testing. The jython.jar file needs to be added to the classpath of the project. Jython should either be installed in a directory called "jython" under your home directory, or alternatively the python.home property can be set to point to where jython is installed for unit tests to succeeed. The following files were modified or added src/org/springframework/scripting/config/LangNamespaceHandler.java src/org/springframework/scripting/config/spring-lang-2.0.xsd src/org/springframework/scripting/jython/JythonScriptFactory.java src/org/springframework/scripting/jython/JythonScriptUtils.java src/org/springframework/scripting/jython/package.html test/org/springframework/scripting/jython/Divider.java test/org/springframework/scripting/jython/JythonScriptFactoryTests.java test/org/springframework/scripting/jython/Multiplier.java test/org/springframework/scripting/jython/beans.py test/org/springframework/scripting/jython/broken.py test/org/springframework/scripting/jython/jython-context.xml test/org/springframework/scripting/jython/jython-context-broken.xml test/org/springframework/scripting/jython/jython-context-xsd.xml If the attachment doesn't come through, I have the modified sources posted at http://backups.netradius.com/spring/spring-jython.070720.zip There is still some work I would like to do in regards to namespaces and auto discovery. We are planning on consuming this internally on some projects so hopefully it will get tested more heavily. I am always open to alternative implementation ideas, approaches, criticism etc. Thanks, -- Erik R. Jensen |