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 8254718403 for ; Mon, 1 Feb 2016 08:15:40 +0000 (UTC) Received: (qmail 54455 invoked by uid 500); 1 Feb 2016 08:15:40 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 54300 invoked by uid 500); 1 Feb 2016 08:15:40 -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 54162 invoked by uid 99); 1 Feb 2016 08:15:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Feb 2016 08:15:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 201802C1F6C for ; Mon, 1 Feb 2016 08:15:40 +0000 (UTC) Date: Mon, 1 Feb 2016 08:15:40 +0000 (UTC) From: "Laurent Chiarello (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-9431) TypeConverter autoconfiguration leads to invalid shutdown sequence 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-9431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15125921#comment-15125921 ] Laurent Chiarello commented on CAMEL-9431: ------------------------------------------ Same issue with {{2.16.2}} > TypeConverter autoconfiguration leads to invalid shutdown sequence > ------------------------------------------------------------------ > > Key: CAMEL-9431 > URL: https://issues.apache.org/jira/browse/CAMEL-9431 > Project: Camel > Issue Type: Bug > Components: camel-spring-boot > Affects Versions: 2.16.1 > Reporter: Laurent Chiarello > Priority: Minor > Fix For: 2.16.3, 2.17.0 > > Attachments: CamelSpringBootShutdownTest.java > > > When using autoconfiguration provided by the {{camel-spring-boot}} artifact, a {{TypeConverter}} bean is automatically registered into the Spring context: > {code:title=TypeConversionConfiguration.java} > @Bean > TypeConverter typeConverter(CamelContext camelContext) { > return camelContext.getTypeConverter(); > } > {code} > The returned bean is an instance of {{DefaultTypeConverter}}, which in turn implements {{ServiceSupport}} and its method {{public void shutdown()}}. This method is infered as a _destroy-method_ by Spring, and called during the shutdown of the ApplicationContext. > As a consequence, the TypeConverter will be destroyed before the CamelContext, effectively preventing any type conversion support for the inflight messages that have still to be processed during the graceful shutdown period of Camel. > AFAIK the simple fix would be to disable the destroy-method inference using {{@Bean(destroyMethod="")}}. This will let Camel have a chance to perform a clean shutdown in the right sequence. > As a workaround, it is possible to entirely disable the registration of the type converter in Spring using the property > {{camel.springboot.type-conversion = false}} -- This message was sent by Atlassian JIRA (v6.3.4#6332)