You can use WebSphere® Application Server to define, start, stop, and monitor generic
servers.
Before you begin
Before starting this task, the wsadmin tool must be running. See the topic about starting
the wsadmin scripting client using wsadmin scripting for more information.
About this task
A generic server is a server that the WebSphere Application Server manages but did not supply.
Procedure
- To define a generic server, use the following example:
- To start a generic server, use the launchProcess parameter, for example:
-
Using
Jacl:
set nodeagent [$AdminControl queryNames *:*,type=NodeAgent]
$AdminControl invoke $nodeagent launchProcess generic1
-
Using
Jython:
nodeagent = AdminControl.queryNames ('*:*,type=NodeAgent')
AdminControl.invoke(nodeagent, 'launchProcess', 'generic1')
Example output:
true
or
false
- To stop a generic server, use the terminate parameter, for example:
-
Using
Jacl:
set nodeagent [$AdminControl queryNames *:*,type=NodeAgent]
$AdminControl invoke $nodeagent terminate generic1
-
Using
Jython:
nodeagent = AdminControl.queryNames ('*:*,type=NodeAgent')
AdminControl.invoke(nodeagent, 'terminate', 'generic1')
Example output:
true
or
false
- To monitor the server state, use the getProcessStatus parameter, for
example:
-
Using
Jacl:
$AdminControl invoke $nodeagent getProcessStatus generic1
Using
Jython:
AdminControl.invoke(nodeagent, 'getProcessStatus', 'generic1')
Example output:
RUNNING
or
STOPPED