The reason I implemented this is cos there's a possibility of Caching JSR-107 class keeping a static reference to JCacheManagerFactory, which in turn keeps weak hash map of classloader to cache manager. That weak reference on the classloader is not enough to guarantee that we won't have the mother of permanent space leaks: when a there's a strong static reference to a classloader. For this to work, **all** references to classloader need to be weak, so not only the weak hash map key reference, but all references to classloaders that cache manager and cache have.

If the reference gets gargage collected, that means the class loader has been garbage collected, which means that the classes that are stored in the cache have been garbage collected, so without classes there are no class instances, no objects in the cache. 

A cache is associated with a classloader, and hence if the classloader disspears the cache cannot function correctly, i.e. when it comes loading classes...etc.

Also, keeping strong references to class loaders has been noticed as being the source of some perm gem leaks, see #1682. Keeping weak references to classloaders should work.