Other |
---|
5.0 tigerFixed |
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
JDK 1.4.1 API doc has following description about Introspector cache. -------------------------------------------------------------------------------------- http://java.sun.com/j2se/1.4.1/docs/api/java/beans/Introspector.html Because the Introspector caches BeanInfo classes for better performance, take care if you use it in an application that uses multiple class loaders. In general, when you destroy a ClassLoader that has been used to introspect classes, you should use the Introspector.flushCaches or Introspector.flushFromCaches method to flush all of the introspected classes out of the cache. -------------------------------------------------------------------------------------- A licensee had a server crash issue on their J2EE application server using many class loaders and wants us to improve the way Introspector flushes its cache. They claim that an application server does not know if user application uses Introspector or not. Thus, they want Introspector to flush cache by itself. I have discussed this request with the responsible engineer and got two suggestions for Tiger (J2SE 1.5) from him. 1. Adding new flushCaches(ClassLoader) method to API. This will be useful for short life time ClassLoaders. Current two methods, flushCaches() and flushCache(Class) have room for improvement. The flushCaches() clears everything and it is often too aggressive. To use the flushCache(Class), users have to keep references to all class objects. 2. Making Introspector detect removed ClassLoaders and call above method internally (by itself). I believe those two enhancements solve a licensee issue and would like the bean team to work on it.
|