Welcome!

Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

Enhancing Application Manageability with BEA's Weblogic Server/HP's Openview

Enhancing Application Manageability with BEA's Weblogic Server/HP's Openview

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
This tool, one of several different BEA consoles, is specifically geared to managing WebLogic Server. There are other BEA consoles for the Portal Server, the B2B server, and the Integration Server Application management that we will not discuss here.

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
This tool is a command-line interpreter that connects to a WebLogic Server and translates user commands to JMX calls. These calls are applied to those MBeans registered in the MBean server supplied by BEA, but they might also be applied to user-defined MBeans, if necessary, provided those user-defined MBeans have been registered with the MBean server.

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
HP enhances the BEA WebLogic Server management world by providing a WebLogic Server-specific Smart Plug-in (SPI) module that integrates the management of the WebLogic Server and any associated applications that depend on it. This SPI integrates several sources of information into one screen. It

  • Gathers data from any supplied MBeans, such as those supplied by the WebLogic Server
  • Performs calculations on that data to be more meaningful to the end operator
  • Brings filtered application logging messages to bear on the management task

    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:

  • Existing information (contained in existing MBeans) may be used to provide information through existing OVO-supplied metrics. There are 55 such metrics available for use by the IT operator. These metrics include the number and percentage of available JDBC connections in the overall WebLogic Server connection pool.
  • Existing information may be used to define new user-defined metrics (UDMs).
  • New, custom-built MBeans may be designed by the application developer to provide new information through new metrics. This last approach applies in those situations where business-specific metrics require action by operations personnel. An example of this would be the number of customers who did or did not purchase items at my site in the past day (those who completed their ShoppingCart checkout transaction, or failed to do so, perhaps because the system was not functioning adequately).

    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
    Application developers can, if necessary, add their own metrics using the features of the OVO console. By defining their own metrics, developers help the operator to monitor the applications by allowing new combinations of data to be derived from existing sources. These user-defined metrics are fully described in the HP OVO Administrator's Guide.

    Writing Custom, Application-Specific MBeans
    The JMX features previously described leave the software designer with the problem of deciding which application objects are in need of management visibility and which are not. Should all business objects be capable of being manipulated through their aassociated MBean, or just a chosen few?

    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
    The HP OpenView Smart Plug-in technology provides management of the J2EE application server's internal objects without the application developer having to do extra coding work. Using the OpenView SPI to extend the metrics it supplies to the operator also gives us a powerful tool for manageability of our application.

    Tracking in a J2EE Application with OpenView Transaction Analyzer
    Many developers are concerned with finding the bottlenecks that inhibit high performance in their J2EE applications. This is not an easy task due to the distributed nature of these applications. Developers have found, in many cases, that instrumenting their application with calls that conform to the Application Response Measurement (ARM) API is more intrusive on their applications than they wish to be. This API is designed to allow for detailed accounting of CPU time spent in sections of the application. It is in use in some designs for close monitoring of the processor time spent in certain key areas of a program.

    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
    This article discussed a number of technologies and standards for enabling the manageability aspects of a J2EE or Web services application. Different technologies have benefits based on the nature of the application they are managing and the environment in which they are set.

    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 JMX: http://edocs.bea.com/wls/docs70/javadocs/index.html
  • JSR3: www.jcp.org/en/jsr/detail?id=3
  • JSR77: www.jcp.org/en/jsr/detail?id=77
  • OVO-Metrics: HP OpenView Operations - Metrics Guide
  • OVO-Admin: HP OpenView Operations - Administrators Guide
  • OVO-Concepts: HP OpenView Operations - Concepts Guide
  • OVTA: HP OpenView Transaction Analyzer: www.openview.hp.com/products/transaction_analyzer/index.asp
  • Poole: HP OpenView Architectures for Managing Network Based Services
  • More Stories By Justin Murray

    Justin Murray is a technical consultant in the application development resources organization in HP. He has worked for HP in various consulting and teaching roles. Justin has consulted at a technical level on customer projects involving Java, J2EE and performance management, as well as specializing on application performance tuning for HP-UX. Justin has published several technical papers on these subjects. He can be reached at : [email protected]

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    IoT & Smart Cities Stories
    Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
    Nicolas Fierro is CEO of MIMIR Blockchain Solutions. He is a programmer, technologist, and operations dev who has worked with Ethereum and blockchain since 2014. His knowledge in blockchain dates to when he performed dev ops services to the Ethereum Foundation as one the privileged few developers to work with the original core team in Switzerland.
    René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
    Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
    In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, discussed how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team at D...
    Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...
    Whenever a new technology hits the high points of hype, everyone starts talking about it like it will solve all their business problems. Blockchain is one of those technologies. According to Gartner's latest report on the hype cycle of emerging technologies, blockchain has just passed the peak of their hype cycle curve. If you read the news articles about it, one would think it has taken over the technology world. No disruptive technology is without its challenges and potential impediments t...
    If a machine can invent, does this mean the end of the patent system as we know it? The patent system, both in the US and Europe, allows companies to protect their inventions and helps foster innovation. However, Artificial Intelligence (AI) could be set to disrupt the patent system as we know it. This talk will examine how AI may change the patent landscape in the years to come. Furthermore, ways in which companies can best protect their AI related inventions will be examined from both a US and...
    Bill Schmarzo, Tech Chair of "Big Data | Analytics" of upcoming CloudEXPO | DXWorldEXPO New York (November 12-13, 2018, New York City) today announced the outline and schedule of the track. "The track has been designed in experience/degree order," said Schmarzo. "So, that folks who attend the entire track can leave the conference with some of the skills necessary to get their work done when they get back to their offices. It actually ties back to some work that I'm doing at the University of San...
    When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things'). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing. IoT is not about the devices, its about the data consumed and generated. The devices are tools, mechanisms, conduits. This paper discusses the considerations when dealing with the...