Use administrative programs (JMX)
This topic describes how to use Java APIs to administer WebSphere Application Server and to manage the applications.
We can administer WAS and the applications through tools that come with the product or through programming with the Java APIs.
The wsadmin scripting tool, the administrative console, and the administrative command-line tools come with the product. These administrative tools provide most of the functions needed to manage the product and the applications that run in WAS. Use the command-line tools from automation scripts to control the servers. Scripts that are written for the wsadmin scripting tool offer a wide range of possible custom solutions that we can develop quickly.
Investigate these tools with the Java APIs to determine the best ways to administer WAS and the applications. For information on the Java APIs, view the application programming interfaces documentation.
- No action required for WAS JMX APIs: Each JVM in WAS includes an embedded implementation of JMX. In Application Server, v5, the JVMs contain an implementation of the JMX 1.0 specification. In Application Server, v6.0 and later, the JVMs contain an implementation of the JMX 1.2 specification. The JMX 1.0 implementation used in v5 is the TMX4J package that IBM Tivoli products supply. The JMX 1.2 specification used in v6.0 and later is the open source mx4j package. The JMX implementation change across the releases does not affect the behavior of the JMX MBeans in the Application Server. No Application Server administrative APIs are altered due to the change from the JMX V1.0 specification to the JMX V1.2 specification.
- Action might be required for custom MBeans: The JMX V1.2 specification is compatible with the earlier JMX V1.0 specification. However, we might need to migrate custom MBeans that are supplied by products other than the Application Server from v5 to Version 6.0 and later. The primary concern for these custom MBeans is related to the values used in key properties of the JMX ObjectName class for the MBean. The open source mx4j implementation more stringently enforces property validation according to the JMX 1.2 specification. Test the custom MBeans that we deployed in v5 in v6.0 and later, to ensure compatibility. Full details of the JMX V1.2 specification changes from the JMX V1.0 specification are available in the JMX 1.2 specification.
WAS supports access to the administrative functions through a set of Java classes and methods. We can write a Java program that performs any of the administrative features of the WAS administrative tools. We can also extend the basic WAS administrative system to include our own managed resources.
We can prepare, install, uninstall, edit, and update applications through programming. Preparing an application for installation involves collecting various types of WAS-specific binding information to resolve references defined in the application deployment descriptors. This information can also be modified after installation by editing a deployed application. Updating consists of adding, removing or replacing a single file or a single module in an installed application, or supplying a partial application that manipulates an arbitrary set of files and modules in the deployed application. Updating the entire application uninstalls the old application and installs the new one. Uninstalling an application removes it entirely from the WAS configuration.
Perform any or all of the following tasks to manage WAS and your Java EE applications through programming.
Tasks
- Create a JMX remote client program using the JMX remote API (JSR 160)..
This topic describes how to develop a JMX remote program that uses the JMX remote API (JSR 160) to access the WAS administrative system.
- Create a custom Java administrative client program using the Java administrative APIs.
This topic describes how to develop a Java program that uses the WAS administrative APIs to access the administrative system of WAS.
- Extend the WAS administrative system with custom MBeans.
This topic describes how to extend the WAS administration system by supplying and registering new JMX MBeans in one of the Application Server processes. In this case, we can use the administrative classes and methods to add newly managed objects to the administrative system.
- Deploy and manage a custom Java administrative client program for use with multiple Java Platform, Enterprise Edition application servers.
This topic describes how to connect to a Java EE server, and how to manage multiple vendor servers.
Depending on which tasks you complete, we have created our own administrative program, extended the WAS administrative console, connected and managed vendor servers, or managed the applications through programming.
What to do next
We can continue to administer WAS and the applications through programming or in combination with the tools that come with the WAS.
Subtopics
- JMX for WAS
This topic gives an overview of JMX in general and how this standard applies to WAS.- Create a custom Java administrative client program using WAS administrative Java APIs
This section describes how to develop a Java program for accessing the WAS administrative system using the product administrative APIs.- Create a Java Management Extensions client program using the Java Management Extensions Remote application programming interface
We can develop and build a JMX client program that is compliant with JMX Remote application programming interface (JSR 160). After we have a working JMX client program, we can use it to manage WAS or non-WAS systems.- Extending the WAS administrative system with custom MBeans
We can extend the WAS administration system by supplying and registering new JMX MBeans (see JMX 1.x Specification for details) in one of the WebSphere processes.- Administrative programs for multiple Java Platform, Enterprise Edition application servers
We can develop an administrative client to manage multiple vendor application servers through existing MBean support in the WAS.- Manage a custom Java administrative client program with multiple Java Platform, Enterprise Edition application servers
This section describes how to connect to a Java Platform, Enterprise Edition (Java EE) server, and how to manage multiple vendor servers.- Java Management Extensions V1.0 to Java Management Extensions V1.2 migration
We might need to migrate custom MBeans that are supplied by products other than the Application Server from v5 to v6.0 and later for full compatibility.- JMX interoperability
Starting with v6.0, WAS implements JMX Version 1.2.- Managed object metadata
Information about a node, such as operating system platform and product features, is maintained in the configuration repository in the form of properties. As product features are installed on a node, new property settings are added.
Related:
Additional Application Programming Interfaces (APIs)