-
Bug
-
Resolution: Done
-
Major
-
10.1.6.Final
-
None
Our project is using JCache API's backed by Infinspan. This is a client-server scenario where we are configuring the Hot Rod Java Client to connect to an Infinispan server.
We are using javax.cache.spi.CachingProvider.getCacheManager(URI, ClassLoader, Properties) to obtain a CacheManager. The URI passed points to an infinispan XML that specifies replicated-cache-configuration as part of the configuration. However the cache created from CacheManager.createCache() ends up being a local cache. This proves to be a problem when connecting to a cluster of Infinispan servers, as when other connections attempt to utilize the cached data, they connect to a different Infinispn sever that doesn't have the cached data. We have verified the XML file pointed to by the URI is on the ClassLoader passed to the CacheManager, and still see the same results.
When we attempt this same scenario using embedded mode instead of client server mode, the configuration in the URI is applied correctly. We have even been able to create a cluster of embedded Infinispan servers via JGroups and confirmed the caches are replicated and not local.
We have also attempted this scenario using Infinispan's proprietary APIs:
RemoteCacheManager.administration().getOrCreateCache(String name, BasicConfiguration configuration)
The configuration object passed to RemoteCacheManagerAdmin.getOrCreateCache() loads the same Infinispan XML configuration used in the failing remote JCache scenario (as a XMlStringConfiguration object).
- relates to
-
ISPN-11676 Per-cache Hot Rod client configuration
- Closed