Tag Archive: grails

Jul 30

Grails – Dynamic Plugins – Isolated Classloader

To prevent a possible jars conflict during dynamic plugin execution (what I was talking about in my previous post), I found a simple solution that I’m pasting for you here: class DefaultPluginJob { static triggers = { } static cachedClassLoader = [:] def execute(context) { def libraryFolder = context.mergedJobDataMap.get(“libraryFolder”) if (!cachedClassLoader[context.mergedJobDataMap.get("jobName")]) { log.debug “Constructing class …

Continue reading »

Permanent link to this article: http://blog.mornati.net/2008/07/30/grails-dynamic-plugins-isolated-classloader/