[jbosscache-issues] [JBoss JIRA] Resolved: (JBCACHE-1489) Javadocs not clear on how to create basic local mode caches

Manik Surtani (JIRA) jira-events at lists.jboss.org
Wed Mar 11 13:39:22 EDT 2009


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

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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosscache-issues mailing list