shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhaohuihua (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SHIRO-644) EhCacheManager.getCache Error Cache cacheName already exists
Date Wed, 07 Feb 2018 16:23:00 GMT

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

zhaohuihua updated SHIRO-644:
-----------------------------
    Description: 
1.4.0-RC2 EhCacheManager.java line 155~172

 
 net.sf.ehcache.Ehcache cache = ensureCacheManager().getEhcache(name);
 if (cache == null) {
     {color:#ff0000}synchronized (name.intern()) {color}{
         cache = manager.getCache(name);
         if (cache == null) {
             if (log.isInfoEnabled()) {
                 log.info("Cache with name '{}' does not yet exist.  Creating now.", name);
             }
             this.manager.addCache(name);
  
             cache = manager.getCache(name);
             ...

        }
     }
 } else {
     ...

}

  was:
1.4.0-RC2 EhCacheManager.java line 155~172

 
net.sf.ehcache.Ehcache cache = ensureCacheManager().getEhcache(name);
if (cache == null) {
    {color:#FF0000}synchronized (name.intern()) {color}{
        cache = manager.getCache(name);
        if (cache == null) {
            if (log.isInfoEnabled()) {
                log.info("Cache with name '{}' does not yet exist.  Creating now.", name);
            }
            this.manager.addCache(name);
 
            cache = manager.getCache(name);
 
            if (log.isInfoEnabled()) {
                log.info("Added EhCache named [" + name + "]");
            }
        }
    }
} else {
    if (log.isInfoEnabled()) {
        log.info("Using existing EHCache named [" + cache.getName() + "]");
    }}


> EhCacheManager.getCache Error Cache cacheName already exists
> ------------------------------------------------------------
>
>                 Key: SHIRO-644
>                 URL: https://issues.apache.org/jira/browse/SHIRO-644
>             Project: Shiro
>          Issue Type: Bug
>          Components: Caching 
>    Affects Versions: 1.4.0-RC2, 1.4.0
>            Reporter: zhaohuihua
>            Priority: Major
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 1.4.0-RC2 EhCacheManager.java line 155~172
>  
>  net.sf.ehcache.Ehcache cache = ensureCacheManager().getEhcache(name);
>  if (cache == null) {
>      {color:#ff0000}synchronized (name.intern()) {color}{
>          cache = manager.getCache(name);
>          if (cache == null) {
>              if (log.isInfoEnabled()) {
>                  log.info("Cache with name '{}' does not yet exist.  Creating now.", name);
>              }
>              this.manager.addCache(name);
>   
>              cache = manager.getCache(name);
>              ...
>         }
>      }
>  } else {
>      ...
> }



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message