server pause command

The server pause command pauses all or specific inbound work for an Open Liberty server.

By pausing and resuming inbound work, you can isolate resources for auditing or debugging without having to stop the server. You can pause all components or specific components:

  • Pause HTTP endpoints to isolate one or more resources associated with an HTTP endpoint; for example, a database.

  • Pause message-driven bean (MDB) message endpoints to prevent the endpoints from receiving messages.

Usage examples

Pause all pausable components on the myserver server:

server pause myserver

Pause the db1HttpEndpoint and db2HttpEndpoint HTTP endpoints on the myserver server:

server pause myserver --target=db1HttpEndpoint,db2HttpEndpoint

Pause the Bean MDB message endpoint on the myserver server:

server pause myserver --target=MDBApplication#MDBModule.jar#Bean

Pause the db1HttpEndpoint HTTP endpoint and the Bean MDB message endpoint on the myserver server:

server pause myserver --target=db1HttpEndpoint,MDBApplication#MDBModule.jar#Bean

Syntax

Run the command from the path_to_liberty/wlp/bin directory.

server pause serverName [options]
serverName

The name of the server with components that you want to pause. If the named server is not running or does not exist, the command fails. If no server name is specified, the command uses defaultServer.

Options

Options for the server pause command
OptionDescription

--target=http_endpoint,http_endpoint,…​

A comma-delimited list of HTTP endpoints to pause. Provide the ID of each HTTP endpoint as specified in the server configuration. For example, the following configuration shows two endpoint IDs, db1HttpEndpoint and db2HttpEndpoint, that you can specify for the --target option:

<httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="8800" httpsPort="8810"/>

<httpEndpoint id="db1HttpEndpoint" host="*" httpPort="8801" httpsPort="8811"/>

<httpEndpoint id="db2HttpEndpoint" host="*" httpPort="8802" httpsPort="8812"/>

--target=message_endpoint,message_endpoint,..

A comma-delimited list of message endpoints to pause. Provide the activation name of each MDB message endpoint in the format: ApplicationName#ModuleName#BeanName.

Exit codes

The following exit codes are available for the server pause command and the equivalent executable JAR file ws-server.jar:

Exit codes for the server pause command
CodeExplanation

0

This code indicates successful completion of the requested operation.

1

This code indicates invocation of a redundant operation. For example, starting a started server or stopping a stopped server. This code might also be returned by JVM if invalid Java options are used.

4

This code indicates that an unsupported action was called on a stopped server. For example, the server is not running when the pause action is called.

>=20

Exit codes that are greater than or equal to 20 indicate that an error occurred while performing the request. Messages are printed and captured in log files with more information about the error.