You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Frank Z <fj...@yahoo.com> on 2008/01/09 08:03:30 UTC

looking for sample MBean code for tomcat 6

hello,
I am looking some sample MBean code for TC 6.0..  I was able to model some code after the source code (e.g.  MemoryUserDatabaseMBean.java in the org.apache.catalina.users. package) .

I was also able to create the mbeans-descriptor.xml 

One question that I have is that even though the code compiled and deployed TC, i am not able to see my custom MBean via JConsole .

Are there additional things needed to get the MBean registered properly in TC?

Thanks in advance.


      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: looking for sample MBean code for tomcat 6

Posted by Peter Rossbach <pr...@objektpark.de>.
Please read this:

http://java.sun.com/developer/technicalArticles/J2SE/jmx.html
http://java.sun.com/j2se/1.5.0/docs/guide/jmx/tutorial/tutorialTOC.html

Peter


Am 09.01.2008 um 08:03 schrieb Frank Z:

> hello,
> I am looking some sample MBean code for TC 6.0..  I was able to  
> model some code after the source code (e.g.   
> MemoryUserDatabaseMBean.java in the org.apache.catalina.users.  
> package) .
>
> I was also able to create the mbeans-descriptor.xml
>
> One question that I have is that even though the code compiled and  
> deployed TC, i am not able to see my custom MBean via JConsole .
>
> Are there additional things needed to get the MBean registered  
> properly in TC?
>
> Thanks in advance.
>
>
>        
> ______________________________________________________________________ 
> ______________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/ 
> newsearch/category.php?category=shopping
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: looking for sample MBean code for tomcat 6

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
The best application server on earth
---------------------------------------------------------------------------

Hi Frank, I played with this a long time ago, and I've completely forgotten 
what I did.
When it comes to monitoring servlets (own code) I came to the conclusion 
that its very hard to top a web server and an admin web page behind a 
password... but ok thats why I didnt persue it.

But there were 2 links in particular that I found very useful...
http://oss.wxnet.org/mbeans.html
which talks about general tomcat config.... your question is in there, the 
Mbean starts with a context listener.

and this...
http://www.netbeans.org/kb/articles/jmx-tutorial.html
which is a JMX plug-in for NB... makes testing and just getting the formats 
right easy.

and then on tomcat I vaguely remember having to set up DJava command lines 
so the TC would expose a port to Jconsole...

I dont remember seeing XML config to explicitly start a Mbean, I remember 
seeing that EJB containers tend to automate all this for you.... but servlet 
containers tend to be a little more manual.

Anyway I think armed with those tools, you'll be on your way.
I rember seeing it work on TC 5.5 but I dont think much changes other than 
the location of common/lib

Have fun....




> hello,
> I am looking some sample MBean code for TC 6.0..  I was able to model some 
> code after the source code (e.g.  MemoryUserDatabaseMBean.java in the 
> org.apache.catalina.users. package) .
>
> I was also able to create the mbeans-descriptor.xml
>
> One question that I have is that even though the code compiled and 
> deployed TC, i am not able to see my custom MBean via JConsole .
>
> Are there additional things needed to get the MBean registered properly in 
> TC?
>
> Thanks in advance.
>
>
> 
> ____________________________________________________________________________________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search. 
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org