On 8/18/10 1:40 AM, Carsten Ziegeler wrote: > Justin Edelson wrote >> I implemented a simple GSP/GString ScriptEngine today and got tripped up >> with what ClassLoader to use during script evaluation. Currently, the >> code is using the ClassLoader of the groovy-all bundle. This has a >> dynamic import of *, so it works fine, but this seemed wrong for some >> reason. >> >> Is there a better classloader to use in this context? >> > Yes :) > > We have the commons dynamic classloader which is more intelligent than a > dynamic import *. It has the same functionality as that import but the > class loading can be extended through class loader providers like our > jcr based class loader. > The benefits of this classloader are when it comes to reloads/updates of > bundles. In this case the scripting bundle does not need to be reloaded > and the dynamic classloader service only restarts if an updated class > has actually been loaded. So service restarts are kept to an minimum. > > Our jsp and javascript implementations use this classloader.
Thanks for the pointer. Justin > > Regards > Carsten
