Use the wsadmin scripting objects
The wsadmin tool utilizes a set of management objects which allow you to execute commands and command parameters to configure your environment. Use the AdminConfig, AdminControl, AdminApp, AdminTask, and Help objects to perform administrative tasks.
About this task
Each of the management objects have commands that use to perform administrative tasks. To use the scripting objects, specify the scripting object, a command, and command parameters. In the following example, AdminConfig is the scripting object, attributes is the command, and ApplicationServer is the command parameter.
Using Jythonprint AdminConfig.attributes('ApplicationServer')
Using Jacl$AdminConfig attributes ApplicationServer
Administrative functions within the application server are divided into two categories: functions that work with the configuration of application server installations, and functions that work with the currently running objects on application server installations. Scripts work with both categories of objects. For example, an application server is divided into two distinct entities. One entity represents the configuration of the server that resides persistently in a repository on permanent storage.
- Use the AdminConfig object, the AdminTask object, and the AdminApp object to handle configuration functionality.
The AdminConfig object, the AdminTask object, and the AdminApp object are used when you are managing the configuration of the server that resides persistently in a repository on permanent storage. Use these objects to create, query, change, or remove this configuration without starting an application server process. To use the AdminTask object, be connected to a running server.
- Use the AdminControl object to manage running objects on application server installations.
The AdminControl object is used when managing the running instance of an application server by a Java Management Extensions (JMX) MBean. This instance can have attributes that you can interrogate and change, and operations that you can invoke. These operational actions that are taken against a running application server do not have an effect on the persistent configuration of the server. The attributes that support manipulation from an MBean differ from the attributes that the corresponding configuration supports. The configuration can include many attributes that you cannot query or set from the running object. The application server scripting support provides functions to locate configuration objects and running objects. The objects in the configuration do not always represent objects that are currently running. The AdminControl object manages running objects.
- Use the Help Object to obtain information about the AdminConfig, AdminApp, AdminControl, and AdminTask objects, to obtain interface information about running MBeans, and to obtain help for warnings and error messages.
Help object for scripted administration
Using the AdminApp object for scripted administration
Using the AdminControl object for scripted administration
Using the AdminConfig object for scripted administration
Using the AdminTask object for scripted administration
Jacl Related tasks
Starting the wsadmin scripting client