cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: More on JMX integration
Date Sat, 24 Dec 2005 09:09:01 GMT
Giacomo Pati wrote:
> Hash: SHA1
> I forgot to mention the discovery process for JMX support in the core.
> The CoreServiceManager (the JMXUtils helper class) tries to find a 
> JMX-Agent by calling the method 
> which 
> returns a List of MBeanServer registered in the JVM. If the List 
> contains such agents, the first one is taken to be the MBeanServer of 
> choice and JMX support will be enabled (this is the same process 
> commons-modeler uses but commons-modeler spawnes a JMX agent if there 
> isn't any and this behaviour cannot be prevented) there.
> Now, if JMX support is enabled, the ECM++ system in Cocoon 2.2 calls 
> the JMXUtils.setupJmxFor(...) method for all objects JMX support could 
> be established. So far these are:
> In CoreServiceManager:        for every ComponentHandler instantiated
> In ThreadSafeComponentHandler:    for every Component instantiated
> The mentioned setupJmxFor method in the JMXUtils class tries to find a 
> class composed of the FQCN of the object in question with "MBean" 
> appended. Such a class gets instantiated with the object to be managed 
> injected to its Constructor. This instantiated MBean will be 
> registered with the MBeanServer.
> Now there are other ComponentHandlers that might use this, too, but I 
> didn't worked on them so far.
> One qustion remains: Where should I put the MBean I have written so far?
> - - Into the core as well?
> - - Into its own block (I think the discovery process will have to be
>   changed than as we are directing for unique package names for blocks,
>   right?)
> My real MBeans do introduce the mentioned dependency on the jetty jmx 
> support base classes for easy constructing MBeans (yes, just with 
> Sun's interfaces it is a pain to write good MBean 
> compared to using that jetty package).

Hmm... so IIUC if we want to add the MBean to the core, that would add a 
dependency on Jetty for its helper classes. Can we extract these classes 
in a separate jar (having the full Jetty as a core dependency is bad 
IMO)? The other solution, would be to copy the code for these classes in 
our own repo, but this doesn't look nice.

> Merry Christmas

You too! And Merry Christmas to all cocooners!


Sylvain Wallez                        Anyware Technologies           
Apache Software Foundation Member     Research & Technology Director

View raw message