public static void clearClassLoader ( final ClassLoader classLoader ) { BeanPropertiesCache . clear ( classLoader ) ; final Iterator < Map . Entry < CacheKey , String > > it = CLASS_CACHE . entrySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { final CacheKey key = it . next ( ) . getKey ( ) ; if ( key . loader == classLoader ) { it . remove ( ) ; } } }
This should be called by the container on undeploy to remove all references to the given class loader from the cache .