Create a custom management client to simplify system management in the was V8.5

Source: Internet
Author: User
Tags websphere application server

Create a custom management client to simplify system management in WebSphere application Server V8.5

Using the Admin Command Framework product in the WebSphere application Server V8.5

Brief introduction

The admin command Framework (ACF) in IBM WebSphere application Server V8.5 provides user-friendly, task-oriented commands to perform administrative tasks. Because it is a framework, all commands follow the same syntax and are easy to use. With these commands, WebSphere application Server provides you with the ability to perform configuration, operations, and other environmental functions through the JMX (Java Management Extensions) API, which can be used to create an appropriate Custom management client for your environment.

This article, used primarily as a reference guide, will help you to leverage the command framework products in the management client, ultimately simplifying the details related to configuring the topology, schema, directory structure, and other operational specifications, which are typically required when using the Wsadmin command.

This article describes how to use a custom JMX client to invoke different types of ACF commands and command variants, including how to invoke:

A simple management command

A task command

A command with parameters

An asynchronous command that emits a result in the form of a notification

A command for a specific target object

A command with parameters and steps

A command for a specific target with dynamic step parameters based on the target object

Some settings are required, so the next section will provide some information and guidance to help you get started.

Prepare to use command

The basic knowledge you need to know is that the ACF commands are divided into administrative commands and task commands:

The management command is the basic command type. All ACF commands are of an administrative type.

A task command is an extension of an administrative command. A task command implements complex administrative operations in one or more command steps.

There are two possible steps to implement a task command: In simple terms, a command step is an administrative command that executes as part of a task command. The table step gets the input parameters in the form of a table containing multiple rows and columns. Each parameter in a table step represents a column. Each set of values assigned to the step parameter represents a row. You can assign multiple sets of parameter values to form a table that contains multiple rows.

Some administrative commands and task commands are asynchronous, and the results of these commands are issued by command notifications. Asynccommandclient is a helper class provided by ACF that wraps asynchronous commands so that their behavior becomes synchronized. This enables the client to have a single implementation of synchronous and asynchronous commands.

This article explores asynchronous and synchronous commands and uses Asynccommandclient to process and execute both types of commands.

Before you start using the ACF command in a WebSphere application Server environment, you need to make certain settings. You need to:

Create Adminclient to invoke the ACF command on the server, the JMX client needs to establish a connection to the server using the Adminclient interface provided by the WebSphere Application Server (listing 1). Listing 1

Properties Props = new properties ();
            
Props.setproperty (Adminclient.connector_host, HOST);
Props.setproperty (Adminclient.connector_port, PORT);
Props.setproperty (ADMINCLIENT.CONNECTOR_TYPE,ADMINCLIENT.CONNECTOR_TYPE_SOAP);
    
try {
    this.adminclient = adminclientfactory.createadminclient (props);
} catch (Connectorexception e) {
    throw e;
}

Create a session and Configservice

A session will be required to process the configuration data and Configservice to hold the configuration changes that were performed in the session (listing 2).
Listing 2

This.session = new session ();
This.cfgservice = new Configserviceproxy (adminclient);

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/extra/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.