geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Köhler <Kristian.Koeh...@gmx.de>
Subject [PATCH] XDoclet / JMXDoclet based MBean interface generation added to core module
Date Fri, 15 Aug 2003 21:26:14 GMT
Hi,

we extended the build process of the core module by including XDoclet / 
JMXDoclet based MBean interface generation. Using JMXDoclet all MBean 
interfaces can be created automatically based on meta information in the 
implementing classes hence avoiding tedious copy/paste duplication.

To do so we included the xdoclet plugin for maven as outlined in the 
xdoclet documentation (see 
http://xdoclet.sourceforge.net/maven-plugin.html), adjusted the build 
files for the core module accordingly, added meta information to all 
mbean implementors and removed the respective interfaces (which are now 
created when building via maven).

Here is how to make use of the functionality for a simple example (patch 
includes all changes of course :-)):

/**
  * @jmx.mbean
 */
public class ClassSpace extends URLClassLoader implements ClassSpaceMBean {
    public ClassSpace(URL[] urls) {
        super(urls);
    }

    /**
     * @jmx.managed-operation
     * @jmx.managed-parameter type="List" name="urls"  
     */
    public void addURLs(List urls) {
        for (Iterator i = urls.iterator(); i.hasNext();) {
            URL url = (URL) i.next();
            addURL(url);
        }
    }
}

Besides applying the patch, the following classes have to be removed:

org.apache.geronimo.deployment.DeploymentControllerMBean.java
org.apache.geronimo.deployment.DeploymentInfoMBean.java
org.apache.geronimo.deployment.loader.ClassSpaceMBean.java
org.apache.geronimo.deployment.repository.ComponentRepositoryMBean.java
org.apache.geronimo.deployment.scanner.DeploymentScannerMBean.java
org.apache.geronimo.deployment.service.ServiceDeploymentMBean.java
org.apache.geronimo.deployment.service.ServiceDeploymentPlannerMBean.java
org.apache.geronimo.jmx.RelationshipMBean.java

We hope someone will apply this patch,

cheers,

Steffen Schluff and Kristian Köhler


Mime
View raw message