[infinispan-issues] [JBoss JIRA] (ISPN-19) different cache manager impl : LocalCacheManager and ClusteredCacheManager

Tristan Tarrant (JIRA) issues at jboss.org
Wed Apr 13 09:47:00 EDT 2016


     [ https://issues.jboss.org/browse/ISPN-19?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tristan Tarrant closed ISPN-19.
-------------------------------
    Resolution: Out of Date


> different cache manager impl : LocalCacheManager and ClusteredCacheManager
> --------------------------------------------------------------------------
>
>                 Key: ISPN-19
>                 URL: https://issues.jboss.org/browse/ISPN-19
>             Project: Infinispan
>          Issue Type: Feature Request
>          Components: Core
>            Reporter: Mircea Markus
>            Priority: Minor
>
> 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() {
>       GlobalConfiguration globalConfiguration = GlobalConfiguration.getNonClusteredDefault();
>       globalConfiguration.setAllowDuplicateDomains(true);
>       CacheManager dcm1 = new DefaultCacheManager(globalConfiguration);
>       CacheManager dcm2 = new DefaultCacheManager(globalConfiguration);
>       Configuration conf = new Configuration();
>       conf.setCacheMode(Configuration.CacheMode.REPL_SYNC);
>       dcm1.defineCache("replicated", conf);
>       dcm2.defineCache("replicated", conf);
>       dcm1.getCache("replicated");
>       dcm2.getCache("replicated");
>    }



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the infinispan-issues mailing list