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?
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?
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.