WAS v8.5 > Reference > Administrator examplesExample: Collecting arguments for the AdminControl object using wsadmin.sh
This example shows how to use multiple arguments with the AdminControl object.
Verify the arguments parameter is a single string. Each individual argument in the string can contain spaces. Collect each argument containing spaces in some way.
- An example of how to obtain an MBean follows:
Jacl:
set am [$AdminControl queryNames type=ApplicationManager,process=server1,*]
Jython:
am = AdminControl.queryNames('type=ApplicationManager,process=server1,*')
- Multiple ways exist to collect arguments containing spaces. Choose one of the following alternatives:
Jacl:
- $AdminControl invoke $am startApplication {"JavaMail Sample"}
- $AdminControl invoke $am startApplication {{JavaMail Sample}}
- $AdminControl invoke $am startApplication "\"JavaMail Sample\""
Jython:
- AdminControl.invoke(am, 'startApplication', '[JavaMail Sample]')
- AdminControl.invoke(am, 'startApplication', '\"JavaMail Sample\"')
Related
Use the wsadmin scripting AdminControl object for scripted administration