Follow these tips to get the best performance from the wsadmin tool.
The following performance tips are for the wsadmin tool:
The following example, illustrates running multiple application installation commands from a batch file. Using Jacl:
wsadmin -c "$AdminApp install /home/myDir/myApps/App1.ear {-appname appl1}" wsadmin -c "$AdminApp install /home/myDir/myApps/App2.ear {-appname appl2}" wsadmin -c "$AdminApp install /home/myDir/myApps/App3.ear {-appname appl3}"Using Jython:
wsadmin -lang jython -c "AdminApp.install('/home/myDir/myApps/App1.ear', '[-appname appl1]')" wsadmin -lang jython -c "AdminApp.install('/home/myDir/myApps/App2.ear', '[-appname appl2]')" wsadmin -lang jython -c "AdminApp.install('/home/myDir/myApps/App3.ear', '[-appname appl3]')"
Or, for example, using Jacl, you can create the appinst.jacl file that contains the commands:
$AdminApp install /home/myDir/myApps/App1.ear {-appname appl1} $AdminApp install /home/myDir/myApps/App2.ear {-appname appl2} $AdminApp install /home/myDir/myApps/App3.ear {-appname appl3}
Invoke this file... wsadmin -f appinst.jacl
Or using Jython, you can create the appinst.py file, that contains the commands:
AdminApp.install('/home/myDir/myApps/App1.ear', '[-appname appl1]') AdminApp.install('/home/myDir/myApps/App2.ear', '[-appname appl2]') AdminApp.install('/home/myDir/myApps/App3.ear', '[-appname appl3]')
Then invoke this file... wsadmin -lang jython -f appinst.py.
If a scripting client connects to the deployment manager in a multiple machine environment, use a command only if it is necessary for the script to obtain a list of all the MBeans in the system. If you need the MBeans on a node, it is easier to invoke "$AdminControl queryNames node=mynode,*". The JMX system management infrastructure forwards requests to the system to fulfill the first query, *. The second query, node=mynode,* is targeted to a specific machine.