Topic
  • 1 reply
  • Latest Post - ‏2012-12-05T20:22:41Z by SystemAdmin
SystemAdmin
SystemAdmin
37422 Posts

Pinned topic wsadmin cache statistics with MBean using Jython

‏2012-11-28T16:39:47Z |
Hi,

In these examples from WAS infocenter about cache statistics with the MBean interface uses JACL
http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.nd.doc/info/ae/ae/rdyn_mbeancachestat.html
Can someone help with the Jython equivalents?

I want to know what the jython version is for
$AdminControl queryNames type=DynaCache,* // Returns a list of the available dynamic cache MBeans
set mbean <dynamic_cache_mbean>
$AdminControl invoke $mbean getCacheStatistics {baseCache "ExplicitInvalidationsLocal CacheHits"}

So far, I tried the following:

mbean=AdminControl.makeObjectName(AdminControl.queryNames('type=DynaCache,*'))
AdminControl.invoke_jmx(mbean,'getCacheStatistics',parms ,signature)
What should the parameters and signature values look like?

Thanks
Updated on 2012-12-05T20:22:41Z at 2012-12-05T20:22:41Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: wsadmin cache statistics with MBean using Jython

    ‏2012-12-05T20:22:41Z  
    So I found that this would be the jython equivalent:
    from jarray import array
    from java.lang import String
    from java.lang import Object
    mbean=AdminControl.makeObjectName(AdminControl.queryNames('type=DynaCache,*'))
    stats=['ExplicitInvalidationsLocal', 'CacheHits']
    statsArray=array(stats,String)
    params=array(['baseCache', statsArray], Object)
    signature=array(['java.lang.String', '[Ljava.lang.String;'], String)
    print AdminControl.invoke_jmx(mbean,'getCacheStatistics',params ,signature)
    
    Updated on 2014-03-25T23:51:21Z at 2014-03-25T23:51:21Z by iron-man