[infinispan-issues] [JBoss JIRA] Commented: (ISPN-649) CacheManager should restart caches that have been stopped upon request
Galder Zamarreño (JIRA)
jira-events at lists.jboss.org
Wed Sep 15 05:00:28 EDT 2010
[ https://jira.jboss.org/browse/ISPN-649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12551002#action_12551002 ]
Galder Zamarreño commented on ISPN-649:
---------------------------------------
If the CacheManager has been stopped, getCache() now returns an IllegalStateException. The DefaultCacheManager cannot just be restarted, it needs to be recreated since most of initialization is made in constructor and so DefaultCacheManager has not been designed for being restarted. Similar IllegalStateException is thrown a cached cache is used but the CacheManager has been stopped.
Cache instances can however be restarted and so the previus comment wrt cache restarts stands.
> CacheManager should restart caches that have been stopped upon request
> -----------------------------------------------------------------------
>
> Key: ISPN-649
> URL: https://jira.jboss.org/browse/ISPN-649
> Project: Infinispan
> Issue Type: Bug
> Components: Core API
> Affects Versions: 4.0.0.Final, 4.1.0.Final, 4.2.0.ALPHA1
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Fix For: 4.2.0.BETA1, 4.2.0.Final
>
>
> Seems like it's JIRA time this week...
> Anyway, Infinispan allows local put operations to succeed on caches whose status is TERMINATED:
> The following test fails for the wrong reasons:
> Cache cache = cacheManager.getCache();
> cache.put("k", "v");
> cache.stop();
> Cache cache2 = cacheManager.getCache();
> cache2.put("k", "v2");
> assert "v2".equals(cache2.get("k"));
> assert cache2.getStatus() == ComponentStatus.RUNNING : "Cache should be running, but it's not, it's status is" + cache2.getStatus();
> It fails cos the status is TERMINATED. However, if you look closely you'll see that a put for v2 was allowed after cache was stopped and that the value put was retrieved in the get after it.
> This came from building a unit test to replicate http://opensource.atlassian.com/projects/hibernate/browse/HHH-5563
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list