You are viewing a plain text version of this content. The canonical link for it is here.
Posted to phoenix-dev@avalon.apache.org by Huw Roberts <Hu...@mmlive.com> on 2002/07/23 07:36:38 UTC

Management Targets, Topics and XML Generation of Management Info

Submission for XML definition of management interfaces

This submission implements the following functionality:
- management info is stored using the ModelMBeanInfo and related classes
- changes managed objects to be targets that have one or more topics.  each
topic is exported as an ModelMBean
- management info can optionally be generated from *.mxinfo files.  These
files need to be in the same directory as the class the describe
- mxinfo files can be generated using xdoclet tags in the source

I've tested with both DefaultManager and MX4JSystemManager.

I will submit documentation for these, but i think it will evolve a little
more as we get a little experience with it.

The next step after this is to add the tags into the source files, and
modify the build scripts so they get generated with the build. I hope you
like...

List of changes.
================

New Classes:

In org.apache.avalon.phoenix.components.manager:

Target - a target is a managed object.  It has one or more Topics (stored in
ModelMBeanInfo 

objects).  On export each topic is exported as a seperate MBean.

MBeanInfoBuilder - Builds a Target object by reading an mxinfo configuration
file and/or 

introspection.  If present the configuration file defines the topics and the
human friendly 

name for attributes and operations.

In org.apache.avalon.phoenix.tools.xdoclet

MxInfoSubTask - Builds a Target object by reading an mxinfo configuration
file and/or 

introspection.  If present the configuration file defines the topics and the
human friendly 

name for attributes and operations.

mxinfo.j - xdoclet template for generating the mxinfo files

Modified Classes:

ExportHelper - changed so doesn't export each management access
individually, but as an 

array of interfaces.  This is more like how it is done elsewhere.

DefaultApplicationContext - exportObject() changed to accept the array of
interfaces

AbstractJMXManager - lots of changes to generate Targets and export them

ApplicationContext - exportObject() changed to accept the array of
interfaces

PhoenixXDoclet - add the mxInfoSubTask

These changes are in the patch.diff file, which is taken at the
jakarta-avalon-phoenix/src level.


Re: Management Targets, Topics and XML Generation of Management Info

Posted by Peter Royal <pr...@apache.org>.
On Tuesday 23 July 2002 01:36 am, Huw Roberts wrote:
> Submission for XML definition of management interfaces
...
> I will submit documentation for these, but i think it will evolve a little
> more as we get a little experience with it.

This looks *REALLY* neat. Unfortunately I'm in the middle of the other end of 
the managment equation to take a deep look. On the surface one benefit looks 
like the ability to define nice JMX descriptions :)
-pete

-- 
peter royal -> proyal@apache.org

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Management Targets, Topics and XML Generation of Management Info

Posted by Peter Donald <pe...@apache.org>.
I just had a look and I like!

I wont be able to apply it till friday but will do it then. A few things after 
briefly looking at the code. You generate descriptors with

<!DOCTYPE mxinfo PUBLIC "-//PHOENIX/Block Info DTD Version 1.0//EN"
                  "http://jakarta.apache.org/phoenix/blockinfo_1_0.dtd">

at the top which uses the block info DTD. However I am not sure that will 
validate the management info class ;) So it would be best to write a new DTD 
that defines mxinfo format or else to remove the DOCTYPE declaration.

Also there is a few places in the code where you directly log messages. I 
would prefer that the messgaes be stored in a Resources.properties file and 
loaded via ResourceManager or whatever.

BTW would it be possible for you send a mxinfo example. Could you also 
describe the purpose of the proxy class as I am not 100% about it at this 
stage!

On Tue, 23 Jul 2002 15:36, Huw Roberts wrote:
> Submission for XML definition of management interfaces
>
> This submission implements the following functionality:
> - management info is stored using the ModelMBeanInfo and related classes
> - changes managed objects to be targets that have one or more topics.  each
> topic is exported as an ModelMBean
> - management info can optionally be generated from *.mxinfo files.  These
> files need to be in the same directory as the class the describe
> - mxinfo files can be generated using xdoclet tags in the source
>
> I've tested with both DefaultManager and MX4JSystemManager.
>
> I will submit documentation for these, but i think it will evolve a little
> more as we get a little experience with it.
>
> The next step after this is to add the tags into the source files, and
> modify the build scripts so they get generated with the build. I hope you
> like...
>
> List of changes.
> ================
>
> New Classes:
>
> In org.apache.avalon.phoenix.components.manager:
>
> Target - a target is a managed object.  It has one or more Topics (stored
> in ModelMBeanInfo
>
> objects).  On export each topic is exported as a seperate MBean.
>
> MBeanInfoBuilder - Builds a Target object by reading an mxinfo
> configuration file and/or
>
> introspection.  If present the configuration file defines the topics and
> the human friendly
>
> name for attributes and operations.
>
> In org.apache.avalon.phoenix.tools.xdoclet
>
> MxInfoSubTask - Builds a Target object by reading an mxinfo configuration
> file and/or
>
> introspection.  If present the configuration file defines the topics and
> the human friendly
>
> name for attributes and operations.
>
> mxinfo.j - xdoclet template for generating the mxinfo files
>
> Modified Classes:
>
> ExportHelper - changed so doesn't export each management access
> individually, but as an
>
> array of interfaces.  This is more like how it is done elsewhere.
>
> DefaultApplicationContext - exportObject() changed to accept the array of
> interfaces
>
> AbstractJMXManager - lots of changes to generate Targets and export them
>
> ApplicationContext - exportObject() changed to accept the array of
> interfaces
>
> PhoenixXDoclet - add the mxInfoSubTask
>
> These changes are in the patch.diff file, which is taken at the
> jakarta-avalon-phoenix/src level.

-- 
Cheers,

Peter Donald
--------------------------------------------------
"An intellectual is someone who has been educated 
beyond their intelligence."
-------------------------------------------------- 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>