[jboss-jira] [JBoss JIRA] Closed: (JBCACHE-250) Hierarchical caches not working when using JBoss service
Manik Surtani (JIRA)
jira-events at lists.jboss.org
Wed Mar 28 12:05:50 EDT 2007
[ http://jira.jboss.com/jira/browse/JBCACHE-250?page=all ]
Manik Surtani closed JBCACHE-250.
---------------------------------
Resolution: Out of Date
could you pls try with a more recent version.
> Hierarchical caches not working when using JBoss service
> --------------------------------------------------------
>
> Key: JBCACHE-250
> URL: http://jira.jboss.com/jira/browse/JBCACHE-250
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 1.2.3
> Reporter: Nimrod Rivier
> Assigned To: Manik Surtani
> Priority: Minor
> Fix For: 2.0.0.GA
>
>
>
> 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.
> Details:
> 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());
> sCacheFirstLevel.setCacheLoader(sCacheLoader);
> I then insert elements into sCacheFirstLevel, and it seems they are not delegated into sCacheSecondLevel .
> Adding the following did not help
> sCacheFirstLevel.stopService();
> sCacheFirstLevel.startService();
> sCacheSecondLevel.stopService();
> sCacheSecondLevel.startService();
> When I use the following code to create the caches, everything seems to work fine:
> sCacheSecondLevel = new TreeCache();
> sCacheSecondLevel.setCacheLoaderClass"org.jboss.cache.loader.FileCacheLoader");
> Properties filecacheLoaderProperties = new Properties();
> filecacheLoaderProperties.put("location","c:\\temp\\cache\\requests");
> sCacheSecondLevel.setCacheLoaderConfig(filecacheLoaderProperties);
> sCacheFirstLevel = new TreeCache();
> CacheLoader cacheLoader = new LocalDelegatingCacheLoader (sCacheSecondLevel);
> sCacheFirstLevel.setCacheLoader(cacheLoader);
> /* Configure the caches (removed) */
> sCacheSecondLevel.createService();
> sCacheSecondLevel.startService();
> sCacheFirstLevel.createService();
> sCacheFirstLevel.startService();
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list