Status: Closed (View Workflow)
For a client which use the JCache API in combination with a Infinispan server it is expected that a getCache("MyCache") would return a reference to the existing cache or an Exception according to JSR-107 API.
Also the getCacheNames() enableManagement(..) and enableStatistic(...) should support this also.
Excerpt from API Doc:
K,V> Cache<K,V> getCache(String cacheName,
Looks up a managed Cache given its name.
This method must be used for Caches that were configured with runtime key and value types. Use getCache(String) for Caches where these were not specified.
Implementations must ensure that the key and value types are the same as those configured for the Cache prior to returning from this method.
Implementations may further perform type checking on mutative cache operations and throw a ClassCastException if these checks fail.
Implementations that support declarative mechanisms for pre-configuring Caches may return a pre-configured Cache instead of null.
cacheName - the name of the managed Cache to acquire
keyType - the expected Class of the key
valueType - the expected Class of the value
the Cache or null if it does exist or can't be pre-configured
IllegalStateException - if the CacheManager is isClosed()
IllegalArgumentException - if the specified key and/or value types are incompatible with the configured cache.
SecurityException - when the operation could not be performed due to the current security settings