Hey there.
My original submission was a little short sighted as it only addressed the permanent storage in the JspRuntimeContext packagemap.
Where compiler threads are re-used then there's a secondary issue with potentially many threads maintaining individual maps of compiled classes.
I've submitted a modification to the code to kchung for his review which introduces a singleton which essentially wraps a ConcurrentHashMap which all Jsr199Compiler instances can share/re-use.
This map never clears, theres nothing fancy about timestamps etc but from observations, items stored in this map are referenced in the packagemap managed by the JspRuntimeContext.
Rather than post modified code here I'd far rather kchung be happy with it first.
As an aside, I fully accept the fact that production servers should only run in precompiled mode but I have a webapp running on a single instance WITH jsr199 compiler clocking well over 100 transactions/second with nearly 1000 jsps (not legacy jsps, all the new fangled jstl stuff and leveraging struts, its just several big apps rolled into one).
Operationally, pre-compiling jsp's isnt really an option considering downtime involved to deploy and restart services in order to effect even cosmetic changes... 10 years on and several rewrites later and there are still daily requests to tweak!
[Message sent by forum member 'finbarro' (finbarro)]
http://forums.java.net/jive/thread.jspa?messageID=330198