You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by lchdev <lc...@outlook.be> on 2015/12/17 12:14:54 UTC

Camel / SpringBoot integration - Invalid shutdown sequence

I ran into the following problem when using autoconfiguration provided by
/camel-spring-boot/ artifact. By default, there is a configuration classes
that automatically registers a /TypeConverter/ bean into the Spring context:


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.

I have attached a JUnit test case to illustrate this behavior. AFAIK the
simple fix would be to disable the destroy-method inference:
/@Bean(destroyMethod="")/. As a workaround I had to disable type conversion
support using the property 

CamelSpringBootShutdownTest.java
<http://camel.465427.n5.nabble.com/file/n5775220/CamelSpringBootShutdownTest.java>  

Lch



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SpringBoot-integration-Invalid-shutdown-sequence-tp5775220.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel / SpringBoot integration - Invalid shutdown sequence

Posted by lchdev <lc...@outlook.be>.
Done !  CAMEL-9431 <https://issues.apache.org/jira/browse/CAMEL-9431>  



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SpringBoot-integration-Invalid-shutdown-sequence-tp5775220p5775223.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel / SpringBoot integration - Invalid shutdown sequence

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Thanks for reporting. Do you mind logging a JIRA ticket?
http://camel.apache.org/support.html

On Thu, Dec 17, 2015 at 12:14 PM, lchdev <lc...@outlook.be> wrote:
> I ran into the following problem when using autoconfiguration provided by
> /camel-spring-boot/ artifact. By default, there is a configuration classes
> that automatically registers a /TypeConverter/ bean into the Spring context:
>
>
> 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.
>
> I have attached a JUnit test case to illustrate this behavior. AFAIK the
> simple fix would be to disable the destroy-method inference:
> /@Bean(destroyMethod="")/. As a workaround I had to disable type conversion
> support using the property
>
> CamelSpringBootShutdownTest.java
> <http://camel.465427.n5.nabble.com/file/n5775220/CamelSpringBootShutdownTest.java>
>
> Lch
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-SpringBoot-integration-Invalid-shutdown-sequence-tp5775220.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2