Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Computing
Conference & Expo
November 2-4, 2009 NYC
Register Today and SAVE !..

2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
In many cases, the end of the year gives you time to step back and take stock of the last 12 months. This is when many of us take a hard look at what worked and what did not, complete performance reviews, and formulate plans for the coming year. For me, it is all of those things plus a time when I u...
SYS-CON.TV
JMX Debugging
Third-party tools make access easy

BEA WebLogic 8.1 implements the Java Management Extensions (JMX) 1.0. Most WebLogic subsystems (JMS Providers, the JDBC Container, ExecuteQueues, etc.) and their constituents are instrumented as MBeans and contain attributes by which they can be configured, monitored, and managed. An administrative server instance implements an MBeanServer through which its configuration and runtime MBeans and those of its managed servers may be accessed. A managed server instance implements an MBeanServer through which only the configuration and runtime beans that are resident on it may be accessed.

In a debugging scenario in which a running server is misbehaving, both its configuration beans can be examined to diagnose the problem. BEA Weblogic MBeans may be accessed programmatically via the Java API. In addition, WebLogic provides two mechanisms for accessing MBeans without programming: the weblogic.Admin command and the wlconfig ant task. There are, as well, numerous third-party tools that provide convenient access to MBeans. Two, which I will use in what follows, are wlsh, developed by Paco Gomez of BEA, and wlsScripting, developed using JPython by Satya Ghattu, also of BEA.

I have TestDomain configured with one cluster of two managed servers and an additional independent managed server. Connecting to the admin server with wlsh produces the result in Listing 1.

Connecting to ManagedOne produces Listing 2.

Now I can retrieve the ExecuteThreadCurrentIdleCount from the admin server with

wlsh TestDomain:/> idleCount=/ExecuteQueueRuntime/weblogic.kernel.Default/
ExecuteThreadCurrentIdleCount
variable idleCount set to /ExecuteQueueRuntime/weblogic.kernel.Default/
ExecuteThreadCurrentIdleCount (java.lang.String)
wlsh TestDomain:/> get $idleCount
15

It is almost always important in a production scenario for a crashed server to be restarted immediately. Listing 3, using wlsScripting, periodically checks the server’s status and restarts it if necessary. At the same time, it samples critical attributes for debug purposes.

Listing 4 shows the output of running the script against an instance of the examplesServer as a thread becomes stuck.

In a production environment where large amounts of debug are a problem, it is often difficult to track down transient errors. The JMX API can be used to report debug only in certain conditions. Listing 5 installs a counter monitor that is triggered when the OpenSocketsCurrentCount attribute of the ServerRuntime MBeans reaches a certain level. It doesn’t do anything in the NotificationListener.handleNotification method currently, other than note that a notification was received; however, in a real scenario you might launch a thread at this point that would report periodically on the values of attributes associated with critical resources, say the PendingRequestsCurrentCount from the ExecuteQueueRuntimeMBean for the default queue.

This is the output of running the DebugMonitor:


Java debug.DebugMonitor

Active Domain: medrecTwo
Active Servers:
        Name: MedRecServer
        ListenAddress: JWEAVER1/10.62.3.106
        ListenPort: 7001

        Number of servers active in the domain: 1
>>> MyCounter got notification: javax.management.monitor.MonitorNotification
...

Links

  • Starting point for WebLogic JMX documentation: http://edocs.bea.com/wls/docs81/jmx/index.html
  • Progamming examples: http://edocs.bea.com/wls/docs81/jmx/index.html
  • weblogic.Admin command: http://edocs.bea.com/wls/docs81/admin_ref/cli.html#MBean_Management_Command_Reference
  • wlconfig Ant task: http://edocs.bea.com/wls/docs81/admin_ref/ant_tasks.html#1023006
  • wlsh: www.wlshell.net
  • wlsScripting tool: http://dev2dev.bea.com/codelibrary/code/wlst.jsp
  • About Jim Weaver
    Jim Weaver is a backline WebLogic support engineer in Denver. He has been with BEA for more than three years and worked previously as a C++/Java developer for more than ten years.

    In order to post a comment you need to be registered and logged in.

    Register | Sign-in

    Reader Feedback: Page 1 of 1

    SOA World Latest Stories
    Quick Response (QR) codes are intended to help direct users quickly and easily to information about products and services, but they are also starting to be used for social engineering exploits. This article looks at the emergence of QR scan scams and the rising concern for users today....
    The Chinese company that claims it owns the iPad trademark says it plans to seek a ban on iPad exports out of China, threatening global supplies. According to what a lawyer for Proview Technology (Shenzhen) Co Ltd told Reuters, the firm is petitioning Chinese customs to stop shipment...
    Cisco Wednesday filed suit in the European Union’s second-highest court, the General Court in Luxembourg, challenging the European Commission’s rubber stamp last October of Microsoft’s $8.5 billion acquisition of Skype. Cisco says it isn’t opposed to the merger, but figures the EC sh...
    2011 was a year of rapid adoption for public and private cloud services. Instant and on-demand server provisioning was the driving force behind the massive growth. On top, cloud server templates and script automation simplified application installation for simple and pre-defined applic...
    As more enterprises are adopting clouds, the nature of cloud computing is changing. Previously, clouds were used to test applications or for non-mission critical applications. Today, enterprises are using clouds for cost-saving advantages and launching more mission critical application...
    Building a cloud computing environment with on-demand access to compute, network, and storage resources requires an elastic infrastructure at multiple levels. Virtualization combined with x86 servers has transformed the way we scale out compute resources. Unfortunately, legacy Fibre Ch...
    Subscribe to the World's Most Powerful Newsletters
    Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
    Click to Add our RSS Feeds to the Service of Your Choice:
    Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
    myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
    Publish Your Article! Please send it to editorial(at)sys-con.com!

    Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


    SYS-CON Featured Whitepapers
    ADS BY GOOGLE