|
|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TOP THREE LINKS YOU MUST CLICK ON Administration
Enhancing Application Manageability with BEA's Weblogic Server/HP's Openview
By: Justin Murray
Digg This!
In Part 1 of this article (WLDJ, Vol. 2, issue 6), I claimed that manageability is a vital aspect for any application that will be deployed into production, where it will spend most of its life being managed by people who may not be the original designers. These systems and applications managers will need good tools and application visbility for the deployment of the application to be successful. We looked at the basics of manageability, from logging files to log file encapsulation to writing our own JMX beans in order to achieve ever higher levels of manageability in the application. In this article, I'll look at the means by which the various management tools, from the BEA console and WLShell utilities to the HP OpenView features, help the developer and set templates in place for building better applications. There are three JMX client applications available with BEA WebLogic Server today: the Administration Console, the WLShell tool, and the weblogic.Admin command-line utility. The next section gives an outline of the first two as useful tools for the developer. The command-line utility functionality is also seen in the WLShell tool, with a friendlier front end, so it will not be described here.
The WebLogic Server Administration Console Since WebLogic Server 7.0, the WebLogic Server administration console has been a browser-based management environment for many aspects of the WebLogic Server and parts of the applications this server supports. The WebLogic Server Admin console can report and change the status of any servers that it can connect to and any services within those servers, such as a JDBC connection pool service. One of the console's screens is shown in Figure 1. It allows the application developer to visualize the effects of his/her application on the WebLogic Server and to set various changeable aspects of that environment to help the application run well. At runtime, the WebLogic Server automatically supplies a JMX Managed Bean (MBean) object for the server itself (called "weblogic.management.configuration.ServerMBean"), for internal services and for each application servlet and application Enterprise JavaBean (EJB, or business object) under its control. These WebLogic Server-generated MBeans, called RunTimeMBeans, then become management-oriented proxies for their companion application objects. The attributes of the RuntimeMBeans for WebLogic Server-owned objects can be queried, and in some cases set to new values and certain operations executed on them. This is done through the forms that the WebLogic console shows on its user interface. There is a full help system that explains the many forms of MBeans that WebLogic supports in the WebLogic Console, seen as question marks beside their names. Figure 2 shows the name and attributes of one particular MBean entry. This example takes the MBean representing the WebLogic Server process itself and shows us the value of the "ListenPortEnabled" attribute. To support these facilities, WebLogic Server has an MBean server capability which carries out the registration of its generated RunTimeMBeans. The user can therefore see (and adjust) the allowed attributes of these MBeans through the WebLogic Server Admin console. The benefit of having a server-supplied management MBean object representing each servlet and each EJB is that the application is already visible for management down to these levels of granularity. The developer can now work with the MBean logic to add new functionality as required. For example, the properties or attributes of each object can be exposed through forms and data entry fields in the console, under the developer's control. Taking the ShoppingCart example, this object may have been implemented as a Session EJB by the developer. We can then interrogate the attributes of the ShoppingCartMBean object in the Admin console. By constructing the logic in the MBean such that it has a link to the ShoppingCart object and reads and writes data to the ShoppingCart attributes, we provide the management tools with a connection into the business object. This can be summarized as an orderly way to build control, as described in the manageability definition, into the system.
The WLShell Tool The tool allows developers to name a specific MBean that they are interested in monitoring or controlling and to issue commands to it, such as "get the value of the MaxCapacity attribute of MBean named X" or "set the MaxCapacity attribute to 300 on MBean Y". The tool uses a familiar tree-like file system analogy for navigating the domain name, MBean type, name of the MBean, and finally the attribute of the MBean that you wish to get or set. Because the name of a JMC MBean can be long and tedious to type, the tool allows for shorter navigation to an attribute name from a longer JMX name.
A JMX-Compatible Smart Plug-in for HP OpenView Operations This provides a highly desirable management integration, as many IT operations departments want to be able to monitor the health of their computers, networks, application servers, and any applications that depend on them from the same console and using the same familiar tools.
The OVO WebLogic Server SPI uses the JMX MBean server within the WebLogic Server runtime and derives some of its information from the MBeans present in that server. The HP SPI may be used by developers in three ways: Look at the OVO Metrics Guide for the full set of OpenView-supplied metrics. These provide a comprehensive view of the internal operation of the WebLogic Server, adding the cross-correlation of items supplied by the base MBeans.
User-Defined Metrics in HP OpenView Operations
Writing Custom, Application-Specific MBeans The software designer has the option of mapping one MBean to one or to many business objects, depending on the need for management of them. If one business object depends completely on another to get the work done (i.e., they are in a "uses" relationship), then there is an argument for managing them using one MBean. Correspondingly, if objects are entirely independent of each other in the business context, the designer can choose to have a management view of each one, using separate MBeans. It is unlikely that all objects in any system will need a dedicated MBean of their own. The software designer chooses the Java object or EJB that he or she wishes to visualize and control using a management tool. The rules described above regarding conforming to certain interfaces or building a separate MBean object are then applied. Finally, the developer will register the new MBean with the appropriate MBean server process. In the case of the developer using WebLogic Server, that server is the BEA-supplied MBean server. From that point onward, the MBean is manageable using JMX-aware tools. The associated business object is manageable to the degree that its behavior is detemined by its guardian MBean. Developers may find that the WebLogic-supplied MBeans are suitable for their management needs. However, there are situations where each object as an independent unit of management is not enough. For example, if I need to know how many users have abandoned their ShoppingCart objects and how many have not, then I may need to create an aggregation MBean that counts the number of relevant associations and allows this number to be seen at the management level. Second, I may wish to have a listener MBean, for example, whose job it is to watch for users abandoning their ShoppingCart objects without taking them to the checkout phase. This is a custom MBean that I will need to register in my own application code with the MBean server and thus expose it to the tools.
Summary
Tracking in a J2EE Application with OpenView Transaction Analyzer There are now tools on the market, such as the OpenView Transaction Analyzer (OVTA), that use ARM measurement and logging techniques without needing the application developer to make program changes. By exploiting purpose-built class loaders and byte code manipulation, these tools can intercept the entry and exit points from each method in an application, whether that method is in a JSP, servlet, or EJB, and report the time it consumes through ARM calls. The latter calls log data to a separate measurement server that collects the logs for subsequent processing and display without further interference on the application. The ARM API is therefore completely hidden from the application developer and is built into the tool. The degree of accuracy provided by ARM is maintained. This is a very powerful method for analyzing the full J2EE application at development time, or even later at deployment time, for performance bottlenecks. The application developer has to make no changes to code to carry this process out. Figure 3 provides a snapshot of the type of screen that HP's OVTA product produces to aid the developer in performance analysis. It can trace quickly down to the point of the problem in a complex application. In Figure 3, highlighted in red is the key culprit for performance concerns with this particular application. This tool fulfills the final requirement for the application developer in building manageability into an application, that of tracking the paths through the code.
Conclusion The lowest level is that of application logging. Applications that already have some logging built in can benefit from this approach without change. This provides a base level of monitoring in the manageability hierarchy. For those applications that are built on Java and J2EE and adhere to the standards in those fields, JMX poses an attractive choice. JMX and SNMP-style management are not mutually exclusive - JMX agents can generate events that are SNMP compatible. Many applications will require a combination of two or more of the technologies surveyed here to fully satisfy their operational management needs. The technologies are not competing with each other for the application programmer's attention. Instead, they should be regarded as a spectrum-of-choice of levels of sophistication in manageability. Developers should always consider the functionality implemented by the management platform that will be used by the operations staff, before proceeding to instrument their application code with these technologies. Some management platforms provide many of the features required without resorting to extra coding work.
References BEA WEBLOGIC LATEST STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING NEWS FROM THE WIRES
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||