posted 13 years ago
Welcome to the JavaRanch!
I'm guessing that you want to provide SNMP agent functionality. It's been a while, but I think there's actually some SNMP support built into the JVM, so you might want to check that.
SNMP agents are free to present whatever MIBs they wish, but they won't just invent MIBs, so excluding whatever SNMP support the JVM gives you (if any), you're on your own.
There are several ways I could spin this. With Linux/Unix net-snmp, I'd probably write a small agent app as a net-snmp plugin and have that app query the Tomcat server, possibly using JMX as the java-to-java transport and then having the SNMP agent translate JMX data to MIB form. You could also query the webapps using some sort of web services or REST query facility.
Actually putting SNMP code into the webapps would probably not be as flexible.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.