jsr107/jsr107spec — Issue #49: Need symbolic name for classloaders
Author: yannis666
Created: 2011-12-20 22:14:52+00:00
State: open

Currently the fully specified name of a Cache is

Classloader|CacheManagerName|CacheName

in that

String cacheManagerName = "myManager";
String cacheName = "myCache";
Caching.getCacheManager(classLoader1, cacheManagerName).getCache(cacheName);
Caching.getCacheManager(classLoader2, cacheManagerName).getCache(cacheName);

may return different caches even though the cache manager name and cache name are identical.

To cater for the distributed Cache case where a classloader instance is not suitable for identifying a cache, we should introduce a symbolic name for the classloader.

A number of ways we could do that
1) create a dictionary to map symbolic name to classloader
2) introduce some new interface to encapsulate both name and instance used by Caching
...