You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/04/10 16:21:25 UTC

[jira] [Commented] (CAMEL-7174) CacheManager should only be shutdown when last endpoint is stopped

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

Claus Ibsen commented on CAMEL-7174:
------------------------------------

Thanks I have applied the v3 so its part of Camel 2.18.

> CacheManager should only be shutdown when last endpoint is stopped
> ------------------------------------------------------------------
>
>                 Key: CAMEL-7174
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7174
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cache, karaf
>    Affects Versions: 2.8.5
>         Environment: ServiceMix 4.4.2
>            Reporter: metatech
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.18.0
>
>         Attachments: camel_multiple_cache_v3.diff
>
>
> When multiple bundles contain routes with a "cache:" endpoint, if one bundle is stopped, the cache from the other bundle stops working as well.
> Solution : in method doStop of class org.apache.camel.component.cache.CacheManagerFactory, remove the call to cacheManager.shutdown().
> If really useful, a more elaborate reference counting mechanism could be used to stop the CacheManager when the last endpoint is being stopped
> {code}
> Caused by: java.lang.IllegalStateException: The CacheManager has been shut down. It can no longer be used.
> 	at net.sf.ehcache.CacheManager.checkStatus(CacheManager.java:1158)
> 	at net.sf.ehcache.CacheManager.cacheExists(CacheManager.java:1048)
> 	at org.apache.camel.component.cache.CacheEndpoint.initializeCache(CacheEndpoint.java:104)
> 	at org.apache.camel.component.cache.CacheProducer.process(CacheProducer.java:56)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)