You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Alexandre Gattiker (JIRA)" <ji...@apache.org> on 2013/03/01 15:39:13 UTC

[jira] [Commented] (CAMEL-6101) Cache endpoint lazy initialization is not thread safe

    [ https://issues.apache.org/jira/browse/CAMEL-6101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13590570#comment-13590570 ] 

Alexandre Gattiker commented on CAMEL-6101:
-------------------------------------------

Confirm this is fixed in version 2.10.4. Sorry for the disturbance and thank you for a great product.
                
> 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.9.5, 2.10.4, 2.11.0
>
>
> 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