In the project that I am currently working on, we are using Groovy and the Groovy Script Engine. This class has a constructor that accepts a path (relative to which it resolves the scripts to execute) or a list of URLs. Well, the class works pretty nice with files, loading the scripts from disk, executing them, and also watching them for changes (this is actually why we are using this class as startpoint for Groovy).
After a few days, we got to the need of taking the scripts and putting them in the database. We wanted to make Groovy load somehow the scripts from the DB, and execute them. We also wanted to keep the nice feature with looking for changes and reloading/recompiling/re-executing the script each time it is found to be modified. Read the rest of this entry »