cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <>
Subject Re: More on JMX integration
Date Fri, 23 Dec 2005 19:26:36 GMT
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 

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

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

Suggestion are welcome :-)

Merry Christmas

- --
Giacomo Pati
Otego AG, Switzerland -
Orixo, the XML business alliance -
Version: GnuPG v1.4.2 (GNU/Linux)


View raw message