]
Manik Surtani resolved JBCACHE-1489.
------------------------------------
Resolution: Done
Javadocs not clear on how to create basic local mode caches
-----------------------------------------------------------
Key: JBCACHE-1489
URL:
https://jira.jboss.org/jira/browse/JBCACHE-1489
Project: JBoss Cache
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 3.0.3.GA
Reporter: Manik Surtani
Assignee: Manik Surtani
Fix For: 3.1.0.GA
Could also help by making default config bundles, like
Configuration.getDefaultLocalConfig(), getDefaultReplicatedConfig(), etc.
From Bill Burke, who reported this:
"
Problem:
This code did not work:
CacheFactory factory = new DefaultCacheFactory();
ExpirationAlgorithmConfig exp = new ExpirationAlgorithmConfig();
exp.setMaxNodes(maxSize);
EvictionRegionConfig evictionRegionConfig = new EvictionRegionConfig();
evictionRegionConfig.setEvictionAlgorithmConfig(exp);
EvictionConfig evictConfig = new EvictionConfig();
evictConfig.setDefaultEvictionRegionConfig(evictionRegionConfig);
evictConfig.setWakeupInterval(wakeupInterval);
Configuration config = new Configuration();
config.setCacheMode(Configuration.CacheMode.LOCAL);
config.setEvictionConfig(evictConfig);
I got a NullPointerException at line 700 of RegionManagerImpl. This is because I did not
set the region FQN within the EvictionRegionConfig constructor. There is no documentation
to figure out how to do this. I had to dig into source code to figure out the problem.
Also javadocs are not clear on what the default values are or how to assemble things.
"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: