Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.
A generic server is a server that the WebSphere Application Server manages but did not supply. You can use WebSphere Application Server to define, start, stop, and monitor generic servers.
(dependent on configuration)
$AdminTask createGenericServer mynode {-name generic1 -ConfigProcDef {{"/mydir1/myStartCommand" "arg1 arg2" "" "" "/tmp/workingDirectory" "/mydir2/stopCommand" "argy argz"}}} $AdminConfig save
AdminTask.createGenericServer('mynode', '[-name generic1 -ConfigProcDef [[/mydir1/myStartCommand "a b c" "" "" /tmp/workingDirectory /mydir2/myStopCommand "x y z"]]]') AdminConfig.save()
set nodeagent [$AdminControl queryNames *:*,type=NodeAgent] $AdminControl invoke $nodeagent launchProcess generic1
nodeagent = AdminControl.queryNames ('*:*,type=NodeAgent') AdminControl.invoke(nodeagent, 'launchProcess', 'generic1')
Example output:
trueor
false
set nodeagent [$AdminControl queryNames *:*,type=NodeAgent] $AdminControl invoke $nodeagent terminate generic1
nodeagent = AdminControl.queryNames ('*:*,type=NodeAgent') AdminControl.invoke(nodeagent, 'terminate', 'generic1')
Example output:
trueor
false
$AdminControl invoke $nodeagent getProcessStatus generic1Using Jython:
AdminControl.invoke(nodeagent, 'getProcessStatus', 'generic1')
Example output:
RUNNINGor
STOPPED
Related concepts
AdminConfig object for scripted administration
AdminControl object for scripted administration
Related reference
Commands for the AdminConfig object
Commands for the AdminControl object