tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject Re: User Defined Realm. How to register MBean in Tomcat 4.1.x
Date Tue, 27 Aug 2002 08:16:37 GMT
Roytman, Alex wrote:
> Dear Catalina developers,
> 
> I am trying to port my LDAP realm from tomcat 4.0.x to tomcat 4.1.9.
> I was unable to find any information on how to make my custom Realm work =
> in Catalina's JMX environment. The problem is I do not know how to =
> register (do I need to) a MBean for my realm. Please pardon me if my =
> questions seems to be naive but I had no chance to learn JMX.
> 
> When I try to use my realm Tomcat starts fine, the Realm itself works =
> just fine too but tomcat reports error that MBean for my Realm is not =
> found.=20
> Well it can't be found - it is not registered. So my question is:
> 1. Does tomcat 4.1.x have any way to register custom MBeans ? As far as =
> I understand, right now they are defined in mbeans-descriptors.xml file =
> which is not meant to be modified by deployers. Also how should I supply =
> a factory method for my MBean and do I need it at all.=20
> I tried to fool tomcat by providing modified copy of the =
> mbeans-descriptors.xml and MBeanFactory.class  in =
> $CATALINA_HOME/server/classes and it seems to take it but of course it =
> is just a dirty hack.
> 2. Is it a crime to not to have a MBean for one of the tomcat components =
> (i.e. registering realm with no appropriate MBean)? If MBean is not =
> mandatory can error message be suppressed?
> 
> 
> Your advice is greatly appreciated

You can use the descriptors attribute of the ServerLifecycleListener 
listener in server.xml. The value should be a filename (or a list of 
filename); each of these should point to an XML file describing some 
custom beans according to the commons-modeler DTD.

Remy


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message