Monday, February 20, 2012

Do not use static imports in Groovy/Grails

As per Groovy's documentation, static import is supported and can be used as in java.  However static import usage in Groovy can lead to unpredictable issues. I have been happily using static imports for some time until today when I found very strange issue. Let me demonstrate it with an example of what issue I am talking about.

Groovy/Grails : Hibernate Session Gotchas in multi-threaded code

Click here to view the blog