IBM Support

PK72989: THE INFORMATION IN THE INFORMATION CENTER TO GUIDE A DEVELOPER IN USING A JAVA MANAGEMENT MBEAN IS INADEQUATE

Fixes are available

7.0.0.3: WebSphere Application Server V7.0 Fix Pack 3 for IBM i
7.0.0.3: WebSphere Application Server V7.0 Fix Pack 3 for AIX
7.0.0.3: WebSphere Application Server V7.0 Fix Pack 3 for HP-UX
7.0.0.3: Java SDK 1.6 SR4 Cumulative Fix for WebSphere Application Server
7.0.0.3: WebSphere Application Server V7.0 Fix Pack 3 for Solaris
7.0.0.3: WebSphere Application Server V7.0 Fix Pack 3 for Linux
7.0.0.5: WebSphere Application Server V7.0 Fix Pack 5 for AIX
7.0.0.3: WebSphere Application Server V7.0 Fix Pack 3 for Windows
7.0.0.5: WebSphere Application Server V7.0 Fix Pack 5 for IBM i
7.0.0.5: WebSphere Application Server V7.0 Fix Pack 5 for Windows
7.0.0.5: WebSphere Application Server V7.0 Fix Pack 5 for HP-UX
7.0.0.5: Java SDK 1.6 SR5 Cumulative Fix for WebSphere Application Server
7.0.0.5: WebSphere Application Server V7.0 Fix Pack 5 for Solaris
7.0.0.5: WebSphere Application Server V7.0 Fix Pack 5 for Linux
Java SDK 1.5 SR10 Cumulative Fix for WebSphere Application Server
7.0.0.7: WebSphere Application Server V7.0 Fix Pack 7 for IBM i
7.0.0.7: WebSphere Application Server V7.0 Fix Pack 7 for AIX
7.0.0.7: WebSphere Application Server V7.0 Fix Pack 7 for Windows
7.0.0.7: WebSphere Application Server V7.0 Fix Pack 7 for HP-UX
7.0.0.7: Java SDK 1.6 SR6 Cumulative Fix for WebSphere Application Server
7.0.0.7: WebSphere Application Server V7.0 Fix Pack 7 for Solaris
7.0.0.7: WebSphere Application Server V7.0 Fix Pack 7 for Linux
7.0.0.9: WebSphere Application Server V7.0 Fix Pack 9 for IBM i
7.0.0.9: WebSphere Application Server V7.0 Fix Pack 9 for Windows
7.0.0.9: WebSphere Application Server V7.0 Fix Pack 9 for AIX
7.0.0.9: WebSphere Application Server V7.0 Fix Pack 9 for HP-UX
7.0.0.9: Java SDK 1.6 SR7 Cumulative Fix for WebSphere Application Server
7.0.0.9: WebSphere Application Server V7.0 Fix Pack 9 for Solaris
7.0.0.9: WebSphere Application Server V7.0 Fix Pack 9 for Linux
6.1.0.31: Java SDK 1.5 SR11 FP1 Cumulative Fix for WebSphere Application Server
7.0.0.11: WebSphere Application Server V7.0 Fix Pack 11 for IBM i
7.0.0.11: WebSphere Application Server V7.0 Fix Pack 11 for Windows
7.0.0.11: WebSphere Application Server V7.0 Fix Pack 11 for HP-UX
7.0.0.11: WebSphere Application Server V7.0 Fix Pack 11 for AIX
7.0.0.11: Java SDK 1.6 SR7 Cumulative Fix for WebSphere Application Server
7.0.0.11: WebSphere Application Server V7.0 Fix Pack 11 for Solaris
7.0.0.11: WebSphere Application Server V7.0 Fix Pack 11 for Linux
6.1.0.33: Java SDK 1.5 SR12 FP1 Cumulative Fix for WebSphere
6.1.0.29: Java SDK 1.5 SR11 Cumulative Fix for WebSphere Application Server
7.0.0.13: WebSphere Application Server V7.0 Fix Pack 13 for AIX
7.0.0.13: WebSphere Application Server V7.0 Fix Pack 13 for HP-UX
7.0.0.13: WebSphere Application Server V7.0 Fix Pack 13 for IBM i
7.0.0.13: WebSphere Application Server V7.0 Fix Pack 13 for Linux
7.0.0.13: WebSphere Application Server V7.0 Fix Pack 13 for Solaris
7.0.0.13: WebSphere Application Server V7.0 Fix Pack 13 for Windows
7.0.0.13: Java SDK 1.6 SR8FP1 Cumulative Fix for WebSphere Application Server
6.1.0.35: Java SDK 1.5 SR12 FP2 Cumulative Fix for WebSphere
7.0.0.15: WebSphere Application Server V7.0 Fix Pack 15 for AIX
7.0.0.15: Java SDK 1.6 SR9 Cumulative Fix for WebSphere Application Server
7.0.0.15: WebSphere Application Server V7.0 Fix Pack 15 for HP-UX
7.0.0.15: WebSphere Application Server V7.0 Fix Pack 15 for IBM i
7.0.0.15: WebSphere Application Server V7.0 Fix Pack 15 for Linux
7.0.0.15: WebSphere Application Server V7.0 Fix Pack 15 for Solaris
7.0.0.15: WebSphere Application Server V7.0 Fix Pack 15 for Windows
6.1.0.37: Java SDK 1.5 SR12 FP3 Cumulative Fix for WebSphere
7.0.0.17: WebSphere Application Server V7.0 Fix Pack 17
7.0.0.17: Java SDK 1.6 SR9 FP1 Cumulative Fix for WebSphere Application Server
6.1.0.39: Java SDK 1.5 SR12 FP4 Cumulative Fix for WebSphere Application Server
7.0.0.19: WebSphere Application Server V7.0 Fix Pack 19
6.1.0.41: Java SDK 1.5 SR12 FP5 Cumulative Fix for WebSphere Application Server
7.0.0.21: WebSphere Application Server V7.0 Fix Pack 21
6.1.0.43: Java SDK 1.5 SR13 Cumulative Fix for WebSphere Application Server
7.0.0.23: WebSphere Application Server V7.0 Fix Pack 23
7.0.0.25: WebSphere Application Server V7.0 Fix Pack 25
6.1.0.45: Java SDK 1.5 SR14 Cumulative Fix for WebSphere Application Server
7.0.0.27: WebSphere Application Server V7.0 Fix Pack 27
7.0.0.29: WebSphere Application Server V7.0 Fix Pack 29
6.1.0.47: WebSphere Application Server V6.1 Fix Pack 47
7.0.0.31: WebSphere Application Server V7.0 Fix Pack 31
7.0.0.27: Java SDK 1.6 SR13 FP2 Cumulative Fix for WebSphere Application Server
7.0.0.33: WebSphere Application Server V7.0 Fix Pack 33
7.0.0.35: WebSphere Application Server V7.0 Fix Pack 35
6.1.0.47: Java SDK 1.5 SR16 Cumulative Fix for WebSphere Application Server
7.0.0.19: Java SDK 1.6 SR9 FP2 Cumulative Fix for WebSphere Application Server
7.0.0.21: Java SDK 1.6 SR9 FP2 Cumulative Fix for WebSphere
7.0.0.23: Java SDK 1.6 SR10 FP1 Cumulative Fix for WebSphere
7.0.0.25: Java SDK 1.6 SR11 Cumulative Fix for WebSphere Application Server
7.0.0.27: Java SDK 1.6 SR12 Cumulative Fix for WebSphere Application Server
7.0.0.29: Java SDK 1.6 SR13 FP2 Cumulative Fix for WebSphere Application Server
7.0.0.45: Java SDK 1.6 SR16 FP60 Cumulative Fix for WebSphere Application Server
7.0.0.31: Java SDK 1.6 SR15 Cumulative Fix for WebSphere Application Server
7.0.0.35: Java SDK 1.6 SR16 FP1 Cumulative Fix for WebSphere Application Server
7.0.0.37: Java SDK 1.6 SR16 FP3 Cumulative Fix for WebSphere Application Server
7.0.0.39: Java SDK 1.6 SR16 FP7 Cumulative Fix for WebSphere Application Server
7.0.0.41: Java SDK 1.6 SR16 FP20 Cumulative Fix for WebSphere Application Server
7.0.0.43: Java SDK 1.6 SR16 FP41 Cumulative Fix for WebSphere Application Server

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as documentation error.

Error description

  • The WebSphere Application Server Information Center has a lot of
    information related to writing code to interact with the
    AdminClient and to write Java Management Beans to get statistics
    from the Application Server.  Part of the confusion in the
    Information Center is the organization of the information.
    But also, how certain statistics work is also not
    well-documented. Also, there are two methods for getting this
    information:
    1. use the J2EE management beans, and request the J2EE
    Resources, one of which should be the JMSEndpointStats
    2. Use the PerfMBean.
    The "Using the JMX interface to develop your own monitoring
    application" documents this.
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?
    topic=/com.ibm.websphere.nd.doc/info/ae/ae/tprf_pmijmx.html
    .
    In addition there are some typographical errors in the
    documentation.
    .
    This APAR is to address these issues.
    1. Address some things that are inaccurate in the Information
    Center, such as the coding errors I noted, and the correct
    information to access the queue statistics.
    .
    2. Improve the documentation for the MBean.  To add a
    statement in each statistic to state what its object name is.
    To improve the examples to make them more useful to someone who
    is trying to figure out how to write code to get statistics.
    .
    3. Document how to access the JMSStats since this was difficult.
    The information on how to get the JMSStats from the PerfMBean is
    difficult to find.  There is no documentation on how to do
    that, and in the list where the PMI data enumerated does not
    lst JMSStats in the list of accessible statistics.
    .--------------------------------------------------------------
    Here are the items that need to be corrected in the
    Information Center.
    1. There are two errors on this page.
    com.ibm.websphere.pmi.stat
    Interface WSStats
    .
    The first is this line of code.
    params = new Object[] {jvmMBean, new Boolean(fase)};
    I believe fase should be false.
    .
    The second is that the example code never sets the object
    name
    ObjectName perfMBean;   // get Perf MBean (MBean type=Perf)
    ObjectName jvmMBean;    // get JVM MBean (MBean type=JVM)
    It is hinted at that they should be set.
    .
    3.     The direct path to the PerfMBean to obtain the Queue
    stats was obscure.  The link:
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?
    topic=/com.ibm.websphere.nd.doc/info/ae/ae/rprf_communicationsta
    ts.html
    gives an incorrect path of Performance Modules > SIB Service >
    SIB Messaging Engines > Messaging Engine > Destinations > Queues
    to the queue stats.
    
    The correct path, or at least the path that returned the data,
    is "SIB Service", "SIB Messaging Engines", <busname>,
    "Destinations", "Queues".
    .--------------------------------------------------------------
    In terms of improving the documentation to make it easier to
    get performance statistics from WebSphere AppServer, these
    changes are requested.
    1. Clarify which MBeans have statistics providers in the
    documentation vs. making somone figure this out via code.
    It appears that the JMSResource MBean does not implement any
    J2EE stats. Using the JSR77 J2EE management beans did not
    work.  No statistics providers were available for type
    JMSResource, even
    though the JMSEndpointStats should be if this is implemented.
    For many stats, the statsProvider returns false,
    boolean hasStats = ((Boolean)
    adminClient.getAttribute(jmsMBean,
    "statisticsProvider")).booleanValue();
    .
    hasStats always is false, because the JMSBean always has a
    value of false.
    Document what MBeans have statistics providers that are
    implemented.
    .
    2. The example code in
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.j
    sp?topic=/com.ibm.websphere.base.doc/info/aes/ae/rprf_samplecode
    apidirect.html
    uses the deprecated class
    com.ibm.websphere.management.statistics.JVMStats vs. using the
    javax.management.j2ee classes and a statisticsprovider.
    .
    3. Show a more complex example of getting the stats than just
    the jvmheapsize in
    Using the JMX interface to develop your own monitoring
    application
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?
    topic=/com.ibm.websphere.nd.doc/info/ae/ae/tprf_pmijmx.html
    .
    4. There was no example on how to traverse the tree returned by
    the PerfMBean on a V6 platform.  The examples had quite a bit of
    code, but only one method for V6, which did not show how to do
    this.
    .
    5. There is little mention of the steps necesseary if SSL is
    required for MBean communication over SSL.  It appears to be
    the default. There is only one example that shows how to
    configure the SOAP connection for SSL, but even then there was
    no discussion of how to import the required keys.
    .
    6. For the WSStats[] array returned by querying the PerfMBean
    using the above path, each element returns a type (with
    getStatsType())
    of com.ibm.ws.sib.processor.stats.static.QueueStats, which is a
    non-existent type.
    com.ibm.websphere.pmi.stat.WSStats[] queueStats =
    (com.ibm.websphere.pmi.stat.WSStats[])
    
    getAdminClient().invoke(getPerfObjectName(),
    "getStatsArray", params, signature);
    
    if (queueStats.length > 0 && queueStats[0] != null) {
    System.out.println (queueStats[0].toString());
    .
    This is the output of the println:
    " Stats name=AG_MONITOR_QUEUE,
    type=com.ibm.ws.sib.processor.stats.static.QueueStats {}"
    .
    .------------------------------------------
    Here is what information is needed to access the JMSStats.
    1. The SIBMessagingEngine MBean can be used to retrieve the
    correct stats, to get this to work, the fix for APAR PK59630 is
    needed.
    
    2. Another option is to use the server MBean or the perf Mbean.
    The "SIB Service" group (as can be seen in the runtime PMI
    panels in the Admin console). So something like this...
    .
    String query = "WebSphere:*,type=Server";
    ObjectName queryName = new ObjectName(query);
    Set s = adminClient.queryNames(queryName, null);
    ObjectName serverMbean = (ObjectName)s.iterator().next();
    // Standard JSR-77 stats retrieval.
    Stats serverStats = (Stats)adminClient.getAttribute(serverMbean,
    "stats");
    Statistic[] theStats = serverStats.getStatistics();
    ... and then refine the results down to the SIB-specific
    statistics.
    
    3. Alternatively, to go in via the performance mbean and get
    WSStatsobjects. Here is an example to get ME (Messaging Engine)
    statistics...
    String query = "WebSphere:*,type=Perf";
    ObjectName queryName = new ObjectName(query);
    Set s = adminClient.queryNames(queryName, null);
    ObjectName perfMbean = (ObjectName)s.iterator().next();
    ObjectName serverMBean; // obtained in similar manner to
    performance bean
    
    // invoke getStatsObject on perfMBean
    signature = new String[]
    {"javax.management.ObjectName","java.lang.Boolean"};
    params = new Object[] {serverMBean, new Boolean(false)};
    WSStats wsStats = (WSStats) ac.invoke(serverMBean,
    "getStatsObject", params, signature);
    WSStats meStats = wsStats.getStats("SIB Service").getStats("SIB
    Messaging Engines").getStats (messageEngine);
    .
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of WebSphere Application Server   *
    *                  V6.0.2 and above.                           *
    ****************************************************************
    * PROBLEM DESCRIPTION: This APAR is used to improve the        *
    *                      javadoc information in the Information  *
    *                      Center and to improve the examples to   *
    *                      make them more useful to someone who    *
    *                      is trying to figure out how to write    *
    *                      code to get statistics                  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    1. There are two errors on the page.
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/topic/com.
    ibm.websphere.javadoc.doc/public_html/api/com/ibm/websphere/pmi/
    stat/WSStats.html
    
    com.ibm.websphere.pmi.stat
    Interface WSStats
    .
    The first is this line of code.
    params = new Object[] {jvmMBean, new Boolean(fase)};
    fase should be false.
    .
    The second is that the example code never sets the object
    name
    ObjectName perfMBean;   // get Perf MBean (MBean type=Perf)
    ObjectName jvmMBean;    // get JVM MBean (MBean type=JVM)
    It is hinted at that they should be set.
    

Problem conclusion

  • The javadoc section of the file has been updated with the
    proper example for getting the PerfMBean and JVMMBean and the
    corrections in the text.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PK72989

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    60W

  • Status

    CLOSED DOC

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2008-09-30

  • Closed date

    2008-12-04

  • Last modified date

    2008-12-04

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

Applicable component levels

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 December 2021