This content has been marked as final. Show 3 replies
I tried to configure a hierarchical cache, composed of a first-level memory-only cache, and a second-level file-only cache. It seems not to work when I the caches are jboss services, but works when I use plain classes. Please help.
The caches are created as follows:
TreeCacheMBean sCacheSecondLevel = (TreeCacheMBean)MBeanProxyExt.create(TreeCacheMBean.class, serviceName1, server);
TreeCacheMBean sCacheFirstLevel = (TreeCacheMBean)MBeanProxyExt.create(TreeCacheMBean.class, serviceName2, server);
LocalDelegatingCacheLoader sCacheLoader = new LocalDelegatingCacheLoader(sCacheSecondLevel.getInstance());
I then insert elements into sCacheFirstLevel, and it seems they are not delegated into sCacheSecondLevel .
I even tried to issue stopService() and startService() before the creating the LocalDelegatingCacheLoader , but it did not change anything.
When I use the following code to create the caches, everything seems to work fine:
sCacheSecondLevel = new TreeCache();
Properties filecacheLoaderProperties = new Properties();
sCacheFirstLevel = new TreeCache();
CacheLoader cacheLoader = new LocalDelegatingCacheLoader (sCacheSecondLevel);
/* Configure the caches (removed) */