Scripting objects

 

Scripting objects

The wsadmin tool operates on configurations and running objects through the following set of management objects: AdminConfig, AdminControl, AdminApp, AdminTask, and Help. Each of these objects has commands that you can use to perform administrative tasks. To use the scripting objects, specify the scripting object, a command, and command parameters. For example: Using Jacl:

$AdminConfig attributes ApplicationServer
Using Jython:
print AdminConfig.attributes('ApplicationServer')
where AdminConfig is the scripting object, attributes is the command, and ApplicationServer is the command parameter.

To find out more specific information about each of the scripting objects, including command and command parameter information, see AdminConfig, AdminApp, AdminControl, AdminTask, or Help.

WebSphere Application Server system management separates administrative functions into two categories: functions that work with the configuration of WebSphere Application Server installations, and functions that work with the currently running objects in WebSphere 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. You can create, query, change, or remove this configuration without starting an application server process. The AdminConfig object , the AdminTask object , and the AdminApp object handle configuration functionality. You can invoke configuration functions with or without being connected to a server.

The second entity represents 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 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 WebSphere Application Server scripting support provides functions to locate configuration objects, and running objects. Objects in the configuration do not always represent objects that are currently running. The AdminControl object manages running objects.

You can 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.


Sub-topics
Help object for scripted administration
AdminApp object for scripted administration
AdminControl object for scripted administration
AdminConfig object for scripted administration
AdminTask object for scripted administration

Related concepts
Jacl

Related tasks
Starting the wsadmin scripting client