I\'m looking to access a bean in my destroy closure in the Bootstrap.groovy of my grails project. Any ideas on how to achieve this?
I seem to have no access to servl
Hmm, I can't find any examples of anyone even using the destroy block closure in Bootstrap. From the docs:
It is not guaranteed that {{destroy}} will be called unless the application exits gracefully (for example by using the application server's shutdown command) so don't rely on it too much
As a guess, I'd have to say that the servletContext has already been destroyed before the {{destroy}} closure of Bootstrap is executed, so that bean you're trying to access is gone already. Can anyone confirm?