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 0CCB7108F5 for ; Thu, 19 Feb 2015 12:49:28 +0000 (UTC) Received: (qmail 75915 invoked by uid 500); 19 Feb 2015 12:49:11 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 75871 invoked by uid 500); 19 Feb 2015 12:49:11 -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 75861 invoked by uid 99); 19 Feb 2015 12:49:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Feb 2015 12:49:11 +0000 Date: Thu, 19 Feb 2015 12:49:11 +0000 (UTC) From: "Henryk Konsek (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-8325) Spring Boot and CDI integration don't detect duplicate routes, should support earlier context configuration 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-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14327356#comment-14327356 ] Henryk Konsek commented on CAMEL-8325: -------------------------------------- I will take a look at this soon. I will also add an additional callback to Spring Boot, so you can modify CamelContext before it is started (or even replace created instance with your custom instance). Stay tuned! > Spring Boot and CDI integration don't detect duplicate routes, should support earlier context configuration > ----------------------------------------------------------------------------------------------------------- > > Key: CAMEL-8325 > URL: https://issues.apache.org/jira/browse/CAMEL-8325 > Project: Camel > Issue Type: Improvement > Components: camel-cdi, camel-spring-boot > Affects Versions: 2.14.1 > Reporter: Christian Bauer > > See discussion: > http://mail-archives.apache.org/mod_mbox/camel-users/201502.mbox/%3C8713C0A9-5CB3-45AC-871F-F58ECC28C71E%40christianbauer.name%3E > Most users in both Spring Booth and CDI environments probably rely on auto-discovery of routes, so duplicate route identifiers are a common mistake and should be detected. For this to work, routes have to be added before the CamelContext is started. > This affects both Spring Boot and CDI integration, where the routes are added after CamelContext start, which results in replacement of duplicates without error. > The CDI integration code is actually worse than the Spring Boot code, since users have no chance of customizing the CamelContext with a CamelContextConfiguration. In the Spring Boot integration there is at least that option available to access the CamelContext after it has started, although that still doesn't give you access to the important configuration options such as ManagementStrategy. > I recommend in both Spring Boot and CDI integration to share a (new?) CamelContextConfiguration interface with methods beforeContextStart(CamelContxt ctx) and afterContextStart(CamelContext ctx). Instances of that type should be auto-discovered so the user has a chance to edit the CamelContext. -- This message was sent by Atlassian JIRA (v6.3.4#6332)