Managing Applications With Java SE 6: A Conversation With Vasanthan Dasan

   
By Janice J. Heiss, January 2007  

Articles Index

As Java technology developers write more complex and sophisticated mission-critical programs, the need for improved monitoring and management capacities in the Java platform has also grown. Java Platform, Standard Edition 6 (Java SE 6) now enables developers to attach command-line utility diagnostic tools such as jstat, jmap, jhat, and jstack  to any application without requiring startup in a special mode. In addition, JConsole, with enhanced plug-in support and dynamic attach capability, is much improved.

To get an update on Java SE 6 monitoring enhancements, along with Sun's service offerings, we spoke with Sun Distinguished Engineer Vasanthan Dasan, who serves as chief technologist for the Services Product Unit, which creates service products and manages $5 billion in service revenue. Dasan is responsible for the architecture of mission-critical services around Sun's systems, storage, and software products. He also provides technical direction to global services sales and delivery.

Dasan was previously the chief architect for Sun Services Engineering, where he led the development of online support and remote management services for Sun's customer support engineers, external customers, and partners. He joined Sun in 1992 as a Solaris Operating System engineer and helped develop widely adopted products such as JumpStart, Solstice, and SunSolve. Dasan has authored many white papers, books, patents, industry standards, and articles on services and service technologies, including the book, Hands-on Intranet. He lives in Boulder, Colorado, with his wife and two children and enjoys rugby, cycling, and the mountains.

 
"More and more Fortune 1000 companies are creating mission-critical Java applications, so when an application goes down or significant changes are needed, which sooner or later happens to most programs, the situation becomes critical -- for example, especially with Daylight Saving Time changes coming up."
 
 
Vasanthan Dasan
Distinguished Engineer and Chief Technologist, Services Product Unit, Sun Microsystems
 
 

question What should developers understand about the serviceability and maintenance developments in the Java SE 6 platform?

answer The developments in Java SE 6 should be understood in terms of what's been happening in recent years. The history of Java technology is one of massive adoption, along with the development of increasingly more sophisticated and complex applications on top of the Java programming language. We now have sophisticated trading systems, entire applications stacks, pieces on the back end, and even stand-alone applications. More and more Fortune 1000 companies are creating mission-critical Java applications, so when an application goes down or significant changes are needed, which sooner or later happens to most programs, the situation becomes critical -- for example, especially with Daylight Saving Time changes coming up.

Sun is challenged to provide more sophisticated ways to debug applications that involve, for example, metering, billing, or crucial medical data. If an application fails even briefly, it could cost millions of dollars or, in a medical emergency, lives. If Wall Street stock trading stops for five seconds, there are regulatory implications. If a major e-commerce company goes down, the consequences are huge.

 
"The new monitoring and management capabilities in Java SE 6 enable developers to write specific code for mission-critical applications, to help cope with urgent situations."
 
 
Vasanthan Dasan
Distinguished Engineer and Chief Technologist, Services Product Unit, Sun Microsystems
 

Sun senior staff engineer Mandy Chung has an excellent blog entry on the new monitoring developments in Java SE 6 and an article that I recommend, but I'll give you some basics. The new monitoring and management capabilities in Java SE 6 enable developers to write specific code for mission-critical applications, to help cope with urgent situations. You can dump out the heap of a program, identify memory leaks, figure out if there's a deadlock, or contention of resources, or if a looping situation exists.

JConsole is a Java monitoring and management console, originally included in J2SE 5.0, that allows you to monitor the usage of various Java Virtual Machine (JVM) * resources at runtime. Developers are finding the Java SE 6 JConsole enhancements quite useful. Graeme Wallace, a developer at FareCompare, a company that provides airfare information and handles huge databases, said, "The JConsole in J2SE 5.0 was useful, but the JConsole in Java SE 6 is much better, with its new plug-in architecture. For example, plug-in JTop is a huge improvement, and the new HotSpot diagnostic MBean, which allows you to dump memory, stack traces, and configure VM options on the fly, has proved quite handy."

JTop is a JDK demo that displays an application's usage of CPU time per thread. JTop sorts threads by the amount of CPU usage, allowing you to easily detect a thread that is using inordinate amounts of CPU time. If high-thread CPU consumption is not an expected behavior, the thread may be looping.

 

Java SE 6 Monitoring and Management Enhancements

 
The Impact on Developers

question How will such enhancements make a concrete difference for developers?

answer Suppose that developer A creates a mission-critical application on J2SE 5.0, and developer B creates an equally mission-critical application with Java SE 6, with the new monitoring features embedded. Now suppose the applications crash simultaneously. The debugging time to diagnose the same level of complexity could be dramatically shorter if the developer had the stack trace information from Java SE 6. During critical times, if you don't have the right code, it may be too late, and it will be hard to debug. It's best to build in the monitoring and management capabilities up front.

The more mission-critical an application is, the more you want to think about crashes and deadlocks, which you can ultimately never predict, because you may miss some logic points in handling resources within the JVM. So a deadlock or a loop situation may occur, and the program won't respond. You ask, "Why is this doing that? Let me take a peek inside the stack through the JConsole."

Support for Solaris Dynamic Tracing (DTrace) in Java SE 6

question Tell us about the DTrace support in Java SE 6.

answer We have runtime DTrace support in Java SE 6 for Solaris 10 and future Solaris OS releases. Developers can now use DTrace to trace the whole stack of any running Java application on Solaris 10. DTrace is a comprehensive dynamic tracing facility that is built into the Solaris OS. It enables you to examine the behavior of user programs as well as the behavior of the operating system. It can be used by administrators and developers on live production systems. The JDK 6 HotSpot VM provides built-in DTrace probes.

Java Applications on Linux, Microsoft Windows, and Solaris OS

question Developers often associate Java technology with the Solaris OS, but, in fact, a significant percentage of Java applications run on Windows and Linux. Tell us about the differences in debugging Java software on Linux, Windows, and Solaris.

answer Java SE 6 centralizes the whole paradigm. Solaris, Linux, and Windows each have different sets of debugging tools at the OS level. In the Solaris OS, the DBX debugger program looks at the Solaris structure. Linux, although it's UNIX, has a different set of tools. And then there are Windows debuggers. But that's at the OS level. Java SE 6 monitoring tools function at the JVM level, which is independent of these three platforms. Corporate developers have long requested that we provide them with this. If developers can isolate the problem at the JVM level, they can debug it. That's the easiest part.

Obviously, the JVM itself runs on and interacts with various platforms. If that interaction is the source of the problem -- involving hardware, memory access, or something else -- Sun's service engineers have capabilities on all three platforms and understand the interactions between them and the JVM.

Mission-Critical Support Solutions
 

question Can you give us a real-world example of a runtime problem that Sun was able to solve?

answer Sun has customers in the financial services industry that depend on Java technology to run their applications. Any downtime in the industry has to be reported to the Securities and Exchange Commission. A customer was having static versioning issues that severely impacted its desktop trading application. They contacted our JVM experts directly, and Sun began debugging the issue. We developed an out-of-cycle patch for the customer to get them up and running. The customer has Sun's PremiumPLUS level of support, which provides exception releases -- which means they might not need to fully recertify applications.

Here's another example of a future issue in which Sun could assist. Before March 11, 2007, some customers might require major upgrades to their systems to meet changes in Daylight Saving Time. Customers that have not planned for this time change could face critical impact to their business because older versions of the Java platform might not report time accurately. Sun Java MultiPlatform may assist customers by providing round-the-clock phone support and product escalation for defects. In addition, customers deploying Java technology in mission-critical environments might want to take advantage of the PremiumPLUS service, which provides exception releases patches. Please contact your local Sun or partner representative for more information.

Java MultiPlatform Support: Standard, Premium, and PremiumPLUS
 
"To help developers debug on any platform, Sun offers the Java MultiPlatform Support service as a kind of insurance policy. Like all insurance policies, you hope you never need it, but when you do, you're glad you have it."
 
 
Vasanthan Dasan
Distinguished Engineer and Chief Technologist, Services Product Unit, Sun Microsystems
 

question When developers running Java software in mission-critical enterprise applications hit a snag, what are their support options from Sun?

answer Java technology has a platform-neutral model that runs on multiple platforms. You write once and run on multiple platforms, and you don't have to embed anything specific to the platform. It's basically hidden by the JVM. When developers run into a snag, they might get stymied and think, "My code looks OK, but when it calls this routine in JVM, I get lost, and I don't know what happens now." That's where Sun can help.

To help developers debug on any platform, Sun offers the Java MultiPlatform Support service as a kind of insurance policy. Like all insurance policies, you hope you never need it, but when you do, you're glad you have it. Three levels of Java MultiPlatform Support are available: Standard, Premium, and PremiumPLUS.

Standard Support
The Standard level offers extended local business coverage 12 hours a day, five days a week. Sun engineers are available for support by telephone or on the Internet. You also get 24/7 access to online technical information.

Premium Support
The Premium level is more sophisticated. Running a trading application would probably warrant 24/7 support for expert advice with specific knowledge of your application. This support level covers not only Java applications but, for instance, databases involving third-party vendors such as Oracle. Their experts and our experts coordinate with the application programmer to resolve the problem.

A common question is "Do I foresee such a situation?" You should consider your application stack and where it's getting deployed before you decide whether you need this type of offering. For instance, a trading application may store all the trade data in a database that's running on JVM stacks. And it's running a trade application that's written in the Java programming language. The application may have been written by a third-party company, an integration company, or an internal IT department. You may need a JVM expert from Sun and a database expert from Oracle. The Premium plan covers this.

PremiumPLUS Support
Suppose we've identified and isolated a problem in a JVM. We've got it up and running, but it's only a temporary work-around. How are you going to get the real problem resolved? It may require a code fix in JVM. This means we must get a patch version of JVM out to you so that you can continue to run your application. Sun has engineers with access to the specific version of the client's JVM code who will be able to debug and isolate the problem, fix the code, get it compiled and tested, and fix your JVM so that you can run the application.

We recommend this for ISVs, enterprise customers, finance, telco, government, military, and e-commerce applications.

Prospects for Java SE 7

question Looking ahead to Java SE 7, which is currently scheduled for release in 2008, what monitoring enhancements would you like to see?

answer The platform has formally been a part of the Java Community Process program for a long time, and that is how we accept new changes. We have also open sourced the platform so that people can see all of the changes at the source-code level, which will result in a lot of input from Java developers. So a lot of input from the community will determine what goes into Java SE 7.

Personally, I'd like enhancements at the OS or application level to be able to engage in live probing of transactions. DTrace is capable of this now. I'd like to see more of that capability. I think we're on the right track, but I can't predict where we will be with Java SE 7.

One thing is clear: As more and more mission-critical applications are written in the Java language, we will see correspondingly enhanced management and monitoring features in successive versions of the platform.

_______
* As used on this web site, the terms "Java Virtual Machine" or "JVM" mean a virtual machine for the Java platform.

See Also

Sun Spectrum Java MultiPlatform Java SE, Java ME
Java SE 6 Monitoring, Management, Diagnosability
Crash Course: Java SE Monitoring, Management and Troubleshooting
Monitoring and Managing Java SE 6 Platform Applications
JConsole - Java Monitoring and Management Console
FareCompare Ready to Soar With Migration to Java SE 6
U.S. Daylight Saving Time Changes in 2007
JDK 7 Project

 
Rate and Review
Tell us what you think of the content of this page.
Excellent   Good   Fair   Poor  
Comments:
Your email address (no reply is possible without an address):
Sun Privacy Policy

Note: We are not able to respond to all submitted comments.