Starting and stopping Camel Contexts in Karaf
Starting and stopping the bundle that contains a Camel Context can be very clumsy; you can use the camel:context-start
and camel:context-stop
commands to manage specific contexts.
Getting ready
Follow the instructions under the Listing Camel Contexts in Karaf recipe's Getting ready section for this recipe.
How to do it…
Managing Camel Contexts in Karaf is easy, but requires you to become familiar with two commands, which are as follows:
camel:context-start contextName
: This command is used to start a contextcamel:context-stop contextName
: This command is used to stop a context
The following Camel command invocations demonstrate the result of stopping a context:
karaf@root()> camel:context-list Context Status Uptime ------- ------ ------ CamelCommandContext Started 3.139 seconds karaf@root()> camel:context-stop CamelCommandContext karaf@root()> camel:context...