tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 53085] [perf] [concurrency] DefaultInstanceManager.annotationCache is not optimal for more threads
Date Thu, 19 Apr 2012 12:19:47 GMT

--- Comment #3 from Konstantin Kolinko <> 2012-04-19 12:19:47
UTC ---
Created attachment 28641

I added ManagedConcurrentWeakHashMap class to trunk in r1327915

Here is a patch for trunk that uses that new class to fix this issue. I have
not committed it yet.

Things that I am not sure:

1. Should DefaultInstanceManager implement LifecycleListener just to catch
periodic events?

There is PeriodicEventListener interface that seems more suitable.

The only "problem" though is ugliness in TestDefaultInstanceManager part of the
patch where I need to call this maintenance processing. Simulating a
LifecycleEvent is more than it is worth.

The good thing though is that I do not need to override
StandardContext#backgroundProcessing() to fire the event, nor invent a
LifecycleListener -> PeriodicEventListener adapter.

2. Looking for calls of DefaultInstanceManager constructor, there are 3 such
places. Only the instanceManager instance owned by StandardContext is handled
by this patch.  I wonder whether 2 other places are actually needed.

Maybe amend the Context interface by adding #getInstanceManager() method, at
least in Tomcat 8?

The 3 places:
 - StandardContext#startInternal()
 - ApplicationFilterConfig#getInstanceManager()
 - AsyncContextImpl#getInstanceManager()

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message