cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: More on JMX integration
Date Fri, 23 Dec 2005 19:26:36 GMT
-----BEGIN PGP SIGNED MESSAGE-----
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 
javax.management.MBeanServerFactory.findMBeanServer(null) 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 
javax.management 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 - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDrE90LNdJvZjjVZARAtfsAJsFfYQnYz3ANjktS/qhW7mIXnKEGQCdFJBs
kHcu6IDH8DhhhiL0dvPTiuY=
=1za/
-----END PGP SIGNATURE-----

Mime
View raw message