Make GrailsApplication access done in a method instead of as a static field to prevent servlet issues