Johnny Kewl wrote:
If not and its a bean in your servlet that you want to use.
Then this article is the only one I've ever seen on the subject
http://oss.wxnet.org/mbeans.html
Essentially there is a bean Registry inside tomcat... and the idea is
to get your bean into that registry... then TC will treat it like its
own internal beans, and then Jconsole will see it.
So... it seems you stick your bean in TC libs, you do a little XML
stuff so the TC picks it up, and then you use a listener to start the
bean.
Then your Servlet will just use that bean.
Then mbeans are actually quite complex, and getting the interfaces
right is not so easy, but luckily Netbeans, and probably eclipse (not
sure) has a plugin that automates the testing mbeans in your code...
so together you on your way... hopefully.
That side of it will help you get the Mbean right and figure out how
to get a chart going in Jconsole etc.
Of course you can just ignore the fact that this is Tomcat (i.e. be
servlet engine independent) and register your MBeans with the platform
MBean server in a different domain. [I'm assuming you're using Java 5
or 6.]
Also some MBean approaches are quite complex, but standard MBeans and
then the StandardMBean class when the simple minded standard MBean
pattern runs out of gas are quite easy. Using the latter approach you
can easily have your MBean start with a statically typed/declared MBean
interface and then add dynamic operations and attributes if/when you
need to.
The managed MBean stuff in Tomcat itself is more complicated than most
common use cases require.
--
Jess Holle
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]