camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubertus.Willuhn" <>
Subject Re: Spring Boot and Camel 2.17 - HangupSupport Removed!
Date Wed, 20 Apr 2016 10:56:58 GMT

Trying out your last solution seems to work, thx.

*BUT*: I am now using your solution of my main() which looks like:

public class App
	private static final Logger LOG = LoggerFactory.getLogger(App.class);

	public static void main(String[] args) throws Exception
		try {"Shutdown Application by pressing Ctrl + C");

			SpringApplicationBuilder builder = new

			// disable web "thinking"

			ConfigurableApplicationContext context =;

			PropertySource<?> props = new SimpleCommandLinePropertySource(args);

			if(props.containsProperty("dryrun")) {"---------------------------------------");"DRY RUN, will now shutdown again.");"---------------------------------------");

				if(context.isActive()) context.stop();
			}"{} ready.", App.class.getSimpleName());

		catch(Exception e) {
			LOG.error("{} crashed, Reason: {}", App.class.getSimpleName(),
		finally {"The Camel has left the building!");

So now this works and prints all logs *and* can be shutdown by Ctrl+C
(which seems not to work with plain,

Another interesting fact is, that i am using a CamelContextConfiguration in
my config class like:

	public CamelContextConfiguration contextConfiguration()
		return new CamelContextConfiguration()

The interface of the context configuration decribes two functions
"beforeApplicationStart" and "afterApplicationStart". The later will not be
executed if am using the new Property along with, args). This should be fixed!?

Maybe that wasn't on your screen when adding the new behavior?

If neccessary i will try to provide a basic sample application showing my
usecase, but i am very busy right now caching up patching my apps.

Best regards,


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message