tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: catalina.mbeans package
Date Mon, 29 Jul 2002 20:45:11 GMT


On Mon, 29 Jul 2002 costinm@covalent.net wrote:

> Date: Mon, 29 Jul 2002 13:24:09 -0700 (PDT)
> From: costinm@covalent.net
> Reply-To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
> To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
> Subject: Re: catalina.mbeans package
>
> On Mon, 29 Jul 2002, Craig R. McClanahan wrote:
>
> > Most of the time, you want MBeans to directly delegate attribute read and
> > write operations to the corresponding component object.  Sometimes,
> > though, that is not possible (for example, when the component getter takes
> > an actual object, and the MBean takes a string containing the MBean name).
> > Thus, you can subclass the provided base ModelMBean class and override
> > just the methods you care about -- everything else will pass through with
> > no changes.
>
> Many classes are just extending BaseModelMBean and do nothing ( all those
> with around 4k size :-).
>

Sounds like some cleanup is in order.  Fortunately, that's pretty
transparent to anyone actually using the JMX interfaces.

> For all others - I think we should try to move the method implementation
> in the real code, and keep using 'plain' modeler.
>

The only place that will prove difficult is when a component's method
implementing an operation wants an object instead of a String or primitive
(say, Container.addChild()).  We also have the choice (in Tomcat 5) to
break the existing APIs a little bit more freely, which I didn't believe
we could really do in 4.1.

>
> > There are a bunch of methods on the Connector implementations that are not
> > exposed in Connector.java itself -- and we didn't want to change Connector
> > due to backwards compatibility concerns.  Therefore, there's some special
> > case stuff on the various implementations.
>
> I don't think the interface needs to change - the modeler wraps the real
> object and uses introspection on it.
>
> That means attributes in CoyoteConnector should be visible without need
> to have them in Connector. If not, we should fix modeler to allow this.
>

That's a good idea -- it will reduce the need to write custom MBean
implementations without eliminating the opportunity to do so when it's
helpful.

>
> > In 5.0, this is definitely something that should be refactored in the
> > Connector interfaces so it doesn't have to be special cased.
>
> +1
>
> Costin
>

Craig


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