camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Kunz <>
Subject Spring Boot graceful shutdown issue
Date Thu, 16 Mar 2017 10:46:08 GMT
I have a Spring Boot application that is using JDBC auto-configuration to
start up a pooled datasource to be used by a few camel components. Seems to
work quite nice.

The issue is now that when I shutdown the app (press ctrl+c on the console)
Spring Boot is shutting down the JDBC pool before the Camel Context. And
since a few routes using the datasource may take a few seconds longer to
complete but need to access the datasource I end up getting an Exception
that the datasource was already closed and the route failes.

Any clean solution on how to make sure that CamelContext is the first thing
to get shut down and keep other beans alive until it was actually able to
gracefully shutdown?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message