Details
-
Enhancement
-
Resolution: Obsolete
-
Minor
-
None
-
None
-
None
Description
consider having two CacheManagers impl: LocalCacheaManager and ClusteredCacheManager.
This is in order to offer a more clear API to the user, who might want to use a specific cache manager.
Currently, this is achieved through usage of GlobalConfiguration.getClusterDefault()/getNonClusterDefault(), but this is not very clear to the user.
Also, after trying to create an replicated cache on a cache manager build on an "getNonClusterDefault" config, there will be an unclear error message:
""Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.horizon.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:129)
... 35 more
Caused by: java.lang.NullPointerException
at org.horizon.statetransfer.StateTransferManagerImpl.start(StateTransferManagerImpl.java:116)
... 40 more
Error should be more specific, something like: "You're not allowed to deploy an clustered cache on an local cache manager".
public void testCreateReplicatedCacheOnLocalCM()