User's Guide
Get Adobe Reader |
The following sections describe how to use OAM batch files:
The following shows a an example of an OAM batch file called updateFriends.txt
. The friends and acquaintances lists are imaginary services that keeps track of a person's friends and acquaintances. Using the batch file, four persons are added to the acquaintances list and one person is moved from the acquaintances list to the friends list.
Listing F-1 OAM Batch file example
service Acquaintances
method addPerson
"Donald"
"Doris"
"Mary"
"Mike"
removePerson "John"
Friends:addPerson "John" "36"
The service Acquaintances is selected.
Since four persons are to be added, the method addPerson is selected. By selecting the method, you do not have to specify the method again until you want to use method.
The four persons are added to the acquaintances list. Note that strings have to be put within quotation marks.
To remove a person, the removePerson method is used. Since only one person is removed it is unnecessary to select the method and specify the parameters on a separate rows.
Finally, the removed person is added to the friends list. Since the Friends service is used only once, both the method and parameters are specified on the same row as the service. Note that parameters are separated by a space.
Store the OAM batch file in the bin
directory on the SLEE host where the used SLEE services are installed. for example /usr/local/slee/bin/ directory on BEA WebLogic Network Gatekeeper host.
After connecting the text based Network Gatekeeper Management Tool to the SLEE, the OAM batch file is executed using the command:
exec
"updateFriends
.txt"
The OAM batch file can also be executed from an Network Gatekeeper Management Tool, see Network Gatekeeper Management Tool.
It is also possible to store the OAM batch files in other directories than the bin
directory. The exec
command is then used with an absolute or relative path. The relative path with the bin
directory as starting point. Note that the path has to be specified as a Java string, for example: "C:\\batch_files\\updateFriends.txt
" and "/usr/local/batch_files/updateFriends.txt
".