You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.
ClassFactory currently uses a ThreadLocalMap<Class,Constructor> in order to cache the default constructor lookups used in unmarshalling.
issues:
The Cache is only valid with the current thread, thus each thread (possibly hundreds in an app server) has to populate it's own cache
Use of ThreadLocal's within an application server can lead to ClassLoader leaks, as each Thread can retain a reference to a ThreadLocal even though it is unreachable
The common solution to the ThreadLocal issue is to call ClassFactory.clearCache() in a Servlet filter or similar which removes the ThreadLocal map.
I propose (see mailing list for patch) that the cache can be implemented using a non locking copy on write algorithm that would will be the same or very close performance with a much reduced memory overhead (once populated) and better hit ratio.
Affected Versions
[not determined]
The text was updated successfully, but these errors were encountered:
ClassFactory currently uses a ThreadLocal Map<Class,Constructor> in order to cache the default constructor lookups used in unmarshalling.
issues:
The common solution to the ThreadLocal issue is to call ClassFactory.clearCache() in a Servlet filter or similar which removes the ThreadLocal map.
I propose (see mailing list for patch) that the cache can be implemented using a non locking copy on write algorithm that would will be the same or very close performance with a much reduced memory overhead (once populated) and better hit ratio.
Affected Versions
[not determined]
The text was updated successfully, but these errors were encountered: