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 A063A10E62 for ; Wed, 12 Feb 2014 13:26:22 +0000 (UTC) Received: (qmail 56808 invoked by uid 500); 12 Feb 2014 13:26:22 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 56728 invoked by uid 500); 12 Feb 2014 13:26:21 -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 56689 invoked by uid 99); 12 Feb 2014 13:26:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Feb 2014 13:26:19 +0000 Date: Wed, 12 Feb 2014 13:26:19 +0000 (UTC) From: "Willem Jiang (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-7195) Default ehcache.xml configure from camel-cache jar should not rely on multicast 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-7195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13899079#comment-13899079 ] Willem Jiang commented on CAMEL-7195: ------------------------------------- Hi Joe, You should be able to override the default configuration by apply a new configuration like this. {code} CacheComponent cache = context.getComponent("cache", CacheComponent.class); cache.setConfigurationFile("classpath:test-ehcache.xml"); {code} If you want to do the configuration per endpoint you can let cache endpoint lookup the cache manager factory like this {code} String CACHE_ENDPOINT_URI = "cache://myname1?cacheManagerFactory=#testCacheManagerFactory"; CacheManagerFactory testingCacheManagerFactory = new FileCacheManagerFactory("src/test/resources/test-ehcache.xml"); jndi.bind("testCacheManagerFactory", testingCacheManagerFactory); {code} You can find more examples of those configuration from the unit tests of camel-cache. > Default ehcache.xml configure from camel-cache jar should not rely on multicast > -------------------------------------------------------------------------------- > > Key: CAMEL-7195 > URL: https://issues.apache.org/jira/browse/CAMEL-7195 > Project: Camel > Issue Type: Bug > Components: camel-cache > Affects Versions: 2.10.3 > Reporter: Joe Luo > > Camel-cache component has a default ehcache.xml file embedded and it is used for configuring ehcache. It configures a cacheManagerPeerProviderFactory to use a built-in RMI-based distribution system by default which unfortunately relies on multicast: > {code} > properties="peerDiscovery=automatic, > multicastGroupAddress=230.0.0.1, > multicastGroupPort=4446, timeToLive=1" > propertySeparator="," > /> > {code} > It sometimes causes a problem when deploying a camel cache route due to multicast/network configuration on it's host. > We should not rely on multicast in default ehcache configuration that is enforced by ehcache.xml from camel-cache component jar. We should either remove it from the jar to allow fallback to ehcache-failsafe.xml file from ehcache library or modify the embedded ehcache.xml to avoid relying on multicast. -- This message was sent by Atlassian JIRA (v6.1.5#6160)