On 19/09/2011 12:12, Mark Thomas wrote: > On 12/09/2011 12:15, Konstantin Kolinko wrote: >> 2011/9/7 Mark Thomas <ma...@apache.org>: >>> On 07/09/2011 19:49, Konstantin Kolinko wrote: >>>> 2011/9/7 <ma...@apache.org>: >>>>> Author: markt >>>>> Date: Wed Sep 7 18:11:20 2011 >>>>> New Revision: 1166290 >>>>> >>>>> URL: http://svn.apache.org/viewvc?rev=1166290&view=rev >>>>> Log: >>>>> Add a simple annotation cache to improve performance for applications >>>>> that use lots of non-poolable tags. > > <snip/> > >>>> 2. I wonder when the cache is cleared. E.g. if we are in development >>>> mode or have enabled unloading unused JSPs in JspServlet >>>> configuration. If I understand correctly it accumulates references to >>>> Class objects but never releases them. >>> >>> When the context is stopped. >> >> This issue is still pending. >> Though I think it concerns only development mode, and benefits of this >> cache out-weight the resource leak. > > As written, it makes the maxLoadedJsps Jasper option useless. > > I have given this some thought this morning and I plan on looking at a > WeakHashMap (plus synchronisation to handle the concurrency) based solution.
Fixed in r1172664. <snip/> >> 4. There is code that calls setAccessible() for Method, e.g.: >> >> Method postConstruct = (Method) entry.getAccessibleObject(); >> boolean accessibility = postConstruct.isAccessible(); >> postConstruct.setAccessible(true); >> postConstruct.invoke(instance); >> postConstruct.setAccessible(accessibility); >> >> There will be a race condition if several threads are changing >> (setting or restoring) the method accessibility flag on the same >> Method right before invoke() or isAccessible() calls. > > I'll try and address this along with the WeakHashMap changes since I'll > be adding some syncs already. Fixed in r1172689. The changes have also been back-ported to 7.0.x. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org