There is nothing special with the code to read the mbean attribute. The code
you showed should work. Maybe you don't get to the right mbean or mbean server?
Whatever results you get, make sure it's the same with what you would see with
jmx-console. Try to hit the attributes of another mbean, e.g
So if twiddle gets the requestProcessingTime, how do I get it from the Java
code snippet that I posted? If my Java code is incorrect, could you suggest a
piece of code that could retrieve this?
Thanks
- Rohit
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=40
I just tried this very simple twiddle command on 4.0.5 and got:
| X:\jboss\jboss-4.0.5.GA\bin>twiddle get
"jboss.web:type=RequestProcessor,worker=
| http-0.0.0.0-8080,name=HttpRequest0" requestProcessingTime remoteAddr
maxRequestUri
| requestProcessingTime=1191832947562
| remoteAddr=null
As confirmed, I am already aware of the attributes available for this mbean.
This can be retrieved using ...
| MBeanInfo mbi = connection.getMBeanInfo(name);
| MBeanAttributeInfo[] mbaia = mbi.getAttributes();
|
Anyways, I invoked a twiddle info on this mbean and here's the output:
|
For the mbean you are interested in, check out the exported attributes
operations, e.g.:
| cd jboss-x.y.z\bin
| twiddle info
"jboss.web:type=GlobalRequestProcessor,name=http-127.0.0.1-8080"
|
| Description: null
| +++ Attributes:
| Name: modelerType
| Type: java.lang.String
|
Tried that already; didn't work.
Tried several variations...
a] accessing via attribute: requestProcessingTime
b] accessing via attribute: RequestProcessingTime
c] accessing as operation: getRequestProcessingTime
None of these worked.
- Rohit
View the original post :
http://www.jboss.com/index
Query the MBean and get back the list of all attributes. Probably you need to
use "RequestProcessingTime" (big "R") instead.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090481#4090481
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=postin