« Return to Thread: Groovy runs code in static initializers during compile

Re: Groovy runs code in static initializers during compile

by Aaron Digulla :: Rate this Message:

Reply to Author | View in Thread

Quoting Jochen Theodorou <blackdrag@...>:

> hmm... which might happen, when the next compilation step is done... I
> am not sure. It is really bad, that a classloader does not allow us to
> ask for a class without loading it...

Things would be more simple if there was a shutdown/destroy-hook in  
the classloader. Many libraries like Spring, Ehcache and DB drivers  
have to clean up after themselves but the only way is to attach  
themselves to the VM which is not a good idea when you install them in  
a container like Tomcat or OSGi which is supposed to run forever and  
load/unload plugins on demand.

Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

 « Return to Thread: Groovy runs code in static initializers during compile