Tuesday, 27 March 2012

Objects in wsadmin scripting


The WebSphere® administrative (wsadmin) scripting program is a powerful, non-graphical command interpreter environment enabling you to run administrative operations in a scripting language. You can use the wsadmin tool to perform the same tasks that you can perform using the administrative console.

 

. Five objects are available when you use scripts:
  • AdminControl: Use to run operational commands.
  • AdminConfig: Use to run configurational commands to create or modify WebSphere Application Server configurational elements.
  • AdminApp: Use to administer applications.
  • AdminTask: Use to run administrative commands.
  • Help: Use to obtain general help.
The scripts use these objects to communicate with MBeans that run in WebSphere Application Server processes. MBeans are Java objects that represent Java Management Extensions (JMX) resources. JMX is an optional package addition to Java 2 Platform Standard Edition (J2SE). JMX is a technology that provides a simple and standard way to manage Java objects.
  • 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, you must 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.
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.

No comments:

Post a Comment