Jon,

Yes, this is possible thru your 2nd suggestion.

public class ManagedServlet extends ManagedServletMBean {
  private HttpServlet servlet;
   public ManagedServlet (HttpServlet s) {
       this.servlet = s;
   }
}

In your servlet init code, just instantiate ManagedServlet and register it with MBean server.  Code it to expose what ever methods on the HttpServlet you want.

Greg
 

Jon Brisbin wrote:

I'd like to have a servlet registered in the MBean server.  I first
thought I'd just make it an MBean and deploy it like my other MBeans,
using jboss.net as an example.  It looks like I can't guarantee that
the instance in the webapp is the one in the MBean server, though.

Would it make sense to put some code in the servlet's init method to
register itself and allow itself to be jmx-managed?  I really want to
be able to manage this servlet through the console if I can swing it.

=====
Thanks!

Jon Brisbin

[EMAIL PROTECTED]
417.682.6157 (h/w)
417.825.3995 (c)

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

--
Greg Turner, JBoss Authorized Consultant

Tiburon Enterprise Systems
http://www.tiburon-e-systems.com
Box 1171
Tiburon, CA 94920
415-332-3363
 

Reply via email to