Re: org.apache.catalina JMX descriptor modification

2010-05-06 Thread Mark Thomas

On 06/05/2010 03:45, buddhika chamith wrote:

Hi All,

Please refer to https://issues.apache.org/bugzilla/show_bug.cgi?id=49234 for
a longer description about the descriptor issue in above package. The main
issue is the descriptor for Connector MBean tries to describe different
connectors with same set of attributes. So some attributes in the descriptor
doesn't make sense in one connector or the other (Http and Ajp). Connector
differences arise from attributes of ProtocolHandler class associated with
the connector and not the connector class it self.

Currently there are seperate MBeans describing different protocol handler
attributes as well. This is in addition to some of their attributes being
partially exposed via associated Connector MBean. As far as I understood
following are the possibilities for improvements.

1. Remove descriptions of ProtocolHandler attributes from Connector MBeans
since they are described in related ProtocolHandler MBeans as well. We can
have a attribute reference to the ProtocolHandler objectname in the
Connector MBean to associate ProtocolHandler to the Connector so that they
can be retrieved by going through Connnector.

2. Extract out common attributes in both ProtocolHandlers and include them
in Connector MBean attributes. This way it can expose some ProtocolHandler
attributes directly while refering to the associated ProtocolHandler MBean
for other attributes.


There are currently 5 different ProtocolHandlers in trunk:
org.apache.coyote.http11.Http11Protocol
org.apache.coyote.http11.Http11NioProtocol
org.apache.coyote.http11.Http11AprProtocol
org.apache.coyote.ajp.AjpProtocol
org.apache.coyote.ajp.AjpAprProtocol

I think I am leaning towards option 2. Have the Connector attributes in 
the connector MBean along with any common ProtocolHandler attributes and 
have separate ProtocolHandler MBeans that have all the attributes for 
the ProtocolHandler. The common attributes would then be accessible via 
the Connector MBean and the ProtocolHandler MBean.


It would be worth adding some comments to the MBean descriptors so folks 
who come along later can figure out what is meant to be where.


Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



org.apache.catalina JMX descriptor modification

2010-05-05 Thread buddhika chamith
Hi All,

Please refer to https://issues.apache.org/bugzilla/show_bug.cgi?id=49234 for
a longer description about the descriptor issue in above package. The main
issue is the descriptor for Connector MBean tries to describe different
connectors with same set of attributes. So some attributes in the descriptor
doesn't make sense in one connector or the other (Http and Ajp). Connector
differences arise from attributes of ProtocolHandler class associated with
the connector and not the connector class it self.

Currently there are seperate MBeans describing different protocol handler
attributes as well. This is in addition to some of their attributes being
partially exposed via associated Connector MBean. As far as I understood
following are the possibilities for improvements.

1. Remove descriptions of ProtocolHandler attributes from Connector MBeans
since they are described in related ProtocolHandler MBeans as well. We can
have a attribute reference to the ProtocolHandler objectname in the
Connector MBean to associate ProtocolHandler to the Connector so that they
can be retrieved by going through Connnector.

2. Extract out common attributes in both ProtocolHandlers and include them
in Connector MBean attributes. This way it can expose some ProtocolHandler
attributes directly while refering to the associated ProtocolHandler MBean
for other attributes.

Having seperate MBeans for Connector according to different protocol handler
implementations is not currently feasible since the Connector class type
doesn't change for both implementations. So we are unable to have two
different MBeans to describe objects from same class. This happens because
of the fact that differences arise not due to attributes in base Connector
object but associated ProtocolHandler implementation.

Any suggestions are appreciated.

Regards,
Chamith