Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4C8A8199ED for ; Sun, 10 Apr 2016 12:06:26 +0000 (UTC) Received: (qmail 65693 invoked by uid 500); 10 Apr 2016 12:06:26 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 65648 invoked by uid 500); 10 Apr 2016 12:06:26 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 65636 invoked by uid 99); 10 Apr 2016 12:06:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Apr 2016 12:06:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6C60C2C1F56 for ; Sun, 10 Apr 2016 12:06:25 +0000 (UTC) Date: Sun, 10 Apr 2016 12:06:25 +0000 (UTC) From: "metatech (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CAMEL-7174) CacheManager should only be shutdown when last endpoint is stopped MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-7174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15233938#comment-15233938 ] metatech edited comment on CAMEL-7174 at 4/10/16 12:05 PM: ----------------------------------------------------------- Hi Claus, sorry the for the mistake in the patch. Here is a new V3 which is correct (V3 was the version running in PROD on our site). was (Author: metatech): Hi Claus, sorry the for the mistake in the patch. Here is a new V3 which is correct. > 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: Future > > 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)