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/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

One or more optional parameters. If you do not specify any options, all pausable components on the server are paused.

Options

Option Description

--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:

0

OK. 0 indicates successful completion of the requested operation.

1

1 indicates that the JVM options that were used are not valid.

2

2 indicates that the server does not exist.

>=20

Exit codes 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.