- Apache Karaf Cookbook
- Achim Nierbeck Jamie Goodyear Johan Edstrom Heath Kesler
- 169字
- 2021-09-03 09:55:09
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-list karaf@root()>
How it works…
The context commands operate on the Camel framework and do not represent the OSGi life cycle. Depending upon your application, a stopped context may result in the need to restart its host bundle.
See also
- The Listing routes in Karaf recipe
推薦閱讀
- JavaScript語言精髓與編程實踐(第3版)
- 數據結構與算法JavaScript描述
- 數據結構(Python語言描述)(第2版)
- Android底層接口與驅動開發技術詳解
- 執劍而舞:用代碼創作藝術
- Beginning C++ Game Programming
- Spring 5 Design Patterns
- 動手打造深度學習框架
- Python Deep Learning
- Python Programming for Arduino
- Python程序設計教程
- Java程序設計實用教程(第2版)
- Python物理建模初學者指南(第2版)
- Oracle Database XE 11gR2 Jump Start Guide
- SQL Server 2014 Development Essentials