RE: About JMX

"Bordet, Simone" <[email protected]>
Newsgroups gmane.comp.java.mx4j.devel
Message-ID <[email protected]>
Hi, 

>   Can I create my own mbean server?

MBeanServerFactory.createMBeanServer()

> If I put this mx4j.jar in 
> my app/web- inf/lib and my servlet I can create my own agent?

Yes.

>   I would like to use Tomcat 5.0 and don't migrate to JBoss 
> 3.x.25. But I didn't find more archives about how to 
> instrumentation your web app. 

What do you mean by "instrumenting your application" ?
If you write a servlet, and make it an MBean, you need to register it in the MBeanServer.

I would do:

1. Write a servlet that creates the MBeanServer, and put it in the servlet context. This servlet is only used for initialization.
2. Write a true servlet that serves requests, and expose some monitoring information (make it an MBean); in its init(), take the MBeanServer from the servlet context and register the servlet as MBean.

It's not a complete scenario, but you get the idea.

Simon


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id040&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.