aspose file tools*
The moose likes Tomcat and the fly likes Yiphee ! I created a MBean, Now What ????  (Tomcat 5.5) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Yiphee ! I created a MBean, Now What ????  (Tomcat 5.5)" Watch "Yiphee ! I created a MBean, Now What ????  (Tomcat 5.5)" New topic
Author

Yiphee ! I created a MBean, Now What ???? (Tomcat 5.5)

salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 928

I succeeded to create a Mbean,

My MBean Interface:


When i run this Link:
http://localhost:8080/manager/jmxproxy

Here is my MBean status :


My mbeans-descriptor.xml


now, what i want to do:
1. Change an attribute value
2. Invoke a method

Wait !!!
I did refer online : Apache link for JMX query and set
I tried a lot, but i could not change my Mbean attribute value,
Neither could i invoke my MBean Method


My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 928

This is a closest to a valid operation i could get:

http://localhost:8080/manager/jmxproxy/?set=Application:Name=Server,Type=Server&att=X&value=100


Output answer:
Error - java.lang.NumberFormatException: null

I still am not able to set my attribute value,
btw what if my method has more than 1 parameter ? can i call it with two "&value=XXX" tags ? ( i cant try it as i am not being able to set even
a single value

As a point, Tomcat really sucks @ caching, I have to clean,clean working dir,restart server every time. And on a few occasions, even these
led to stale Outputs (please mention any extra thing i can do to ensure fresh output)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Yiphee ! I created a MBean, Now What ???? (Tomcat 5.5)