camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-6101) Cache endpoint lazy initialization is not thread safe
Date Fri, 01 Mar 2013 12:47:13 GMT

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

Willem Jiang resolved CAMEL-6101.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9.5
                   2.11.0
                   2.10.4

This issue should be resolved with CAMEL-5950.
                
> Cache endpoint lazy initialization is not thread safe
> -----------------------------------------------------
>
>                 Key: CAMEL-6101
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6101
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cache
>    Affects Versions: 2.10.3
>            Reporter: Alexandre Gattiker
>            Assignee: Willem Jiang
>             Fix For: 2.10.4, 2.11.0, 2.9.5
>
>
> Similar to CAMEL-5950, but only occurs at lazy cache initialization.
> {code}
> net.sf.ehcache.ObjectExistsException: Cache sampleCache already exists
>     at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1294) ~[org.apache.servicemix.bundles.ehcache-2.5.2_1.jar:na]
>     at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1184) ~[org.apache.servicemix.bundles.ehcache-2.5.2_1.jar:na]
>     at org.apache.camel.component.cache.CacheEndpoint.initializeCache(CacheEndpoint.java:137)
~[camel-cache-2.10.3.jar:2.10.3]
> {code}
> Workaround:
> {code}
> 		for (Endpoint endpoint : context.getEndpoints()) {
> 			if (endpoint instanceof CacheEndpoint) {
> 				CacheEndpoint ce = (CacheEndpoint) endpoint;
> 				ce.initializeCache();
> 			}
> 		}
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message