Bug 37070

Summary: Servlets not recognized as MBeans
Product: Tomcat 5 Reporter: Sebastian Davids <sdavids>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: Unknown   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Sebastian Davids 2005-10-13 12:06:44 UTC
public class MyServlet extends HttpServlet implements MyServletMBean {
  public void getFoo() { return "foo"; }
}

public interface MyServletMBean {
  void getFoo();
}

@@@

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/catalina/funcspecs/mbean-names.html

states "FIXME - Not yet identified as an MBean".

Couldn't find a bug tracking this issue.

Is there a workaround in the meantime?
Comment 1 Yoav Shapira 2005-11-23 22:56:02 UTC
The workaround depends on what you want to do: can you do the MBean stuff in a
non-Servlet class?  What is your use-case?
Comment 2 Mark Thomas 2006-10-24 16:17:25 UTC
I have fixed the docs and it is possible to register servlet as an MBean. As a
question on the users list if you need help on how to do this.