Book Image

Apache Karaf Cookbook

By : Jamie Goodyear, Johan Edstorm, Achim Nierbeck, Heath J Kesler
Book Image

Apache Karaf Cookbook

By: Jamie Goodyear, Johan Edstorm, Achim Nierbeck, Heath J Kesler

Overview of this book

Table of Contents (17 chapters)
Apache Karaf Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using the CXF stop and start commands


In some instances, there might be a need to control the state of the endpoint manually. Using the stop-endpoint or start-endpoint commands, we can shut down and start up a published endpoint from the command line. This is useful when testing client code to make sure that you are handling unavailable endpoints correctly.

Getting ready

Follow the steps from the Using the CXF list-endpoints command recipe.

How to do it…

Let's look at how to use the stop-endpoint and start-endpoint commands. Both commands require parameters for the bus and endpoint in order to know what to start or stop. The syntax for these commands looks like the following:

cxf:stop-endpoint <bus> <endpoint name>
cxf:start-endpoint <bus> <endpoint name>

To stop an endpoint, follow these steps:

  1. Use the list-endpoints command to get the bus ID and the name of our published endpoint. The following will be the output:

    Name           State      Address      BusID        ...