This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 917

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: 917

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)
 
Similar Threads
How to define target server while configuring JDBC DataSource in WLS 10.3.2 (Not through Console)?
Tomcat 5.0 and custom MBeans
Need help implementing security on RMI based JMX console client connection
jboss, datasource naming and lookup error
JNDI Port number issue while strating JBoss server 4.2.2.GA