You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2010/01/29 12:52:32 UTC

[jira] Resolved: (CAMEL-2428) In camel-cache "diskStorePath" property not efficient

     [ https://issues.apache.org/activemq/browse/CAMEL-2428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-2428.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.0
         Assignee: Claus Ibsen

I have made it possible to set the option regardless or not overflowToDisk was set or not

trunk: 904473.

> In camel-cache "diskStorePath" property not efficient
> -----------------------------------------------------
>
>                 Key: CAMEL-2428
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2428
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: skydjol
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> If you want to change path to persisent cache with "diskStorePath", it has no effect  because cacheManager erase this value.
> In "addCacheNoCheck" method, "setDiskStorePath" call with "diskStorePath" CacheManager property value.
> {code:title=CacheManager.java|borderStyle=solid}
>     public void addCache(Ehcache cache) throws IllegalStateException,
>             ObjectExistsException, CacheException {
>         checkStatus();
>         if (cache == null) {
>             return;
>         }
>         addCacheNoCheck(cache);
>     }
>     private void addCacheNoCheck(Ehcache cache) throws IllegalStateException,
>             ObjectExistsException, CacheException {
>         if (ehcaches.get(cache.getName()) != null) {
>             throw new ObjectExistsException("Cache " + cache.getName() + " already exists");
>         }
>         cache.setCacheManager(this);
>         cache.setDiskStorePath(diskStorePath);
>         cache.initialise();
>         try {
>             cache.bootstrap();
>         } catch (CacheException e) {
>             LOG.log(Level.WARNING, "Cache " + cache.getName() + "requested bootstrap but a CacheException occured. " + e.getMessage(), e);
>         }
>         ehcaches.put(cache.getName(), cache);
>         if (cache instanceof Cache) {
>             caches.put(cache.getName(), cache);
>         }
>         //Don't notify initial config. The init method of each listener should take care of this.
>         if (status.equals(Status.STATUS_ALIVE)) {
>             cacheManagerEventListenerRegistry.notifyCacheAdded(cache.getName());
>         }
>     }
> {code} 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.