XDoclet is a wonderful tool... when it does not break the build system
due to internal problems ;-)
+1 for XDoclet
--jason
On Saturday, August 16, 2003, at 09:42 AM, Jeremy Boynes wrote:
A couple of questions first...
1) Do we want to introduce XDoclet into the build at this time?
2) Do we want to do this for these MBeans as they are likely to
change to ModelMBeans soon (Dain)?
--
Jeremy
-----Original Message-----
From: Kristian K�hler [mailto:[EMAIL PROTECTED]
Sent: Friday, August 15, 2003 2:26 PM
To: [EMAIL PROTECTED]
Subject: [PATCH] XDoclet / JMXDoclet based MBean interface generation
added to core module
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.jav
a
org.apache.geronimo.deployment.scanner.DeploymentScannerMBean.java
org.apache.geronimo.deployment.service.ServiceDeploymentMBean.java
org.apache.geronimo.deployment.service.ServiceDeploymentPlannerMBean.j
ava
org.apache.geronimo.jmx.RelationshipMBean.java
We hope someone will apply this patch,
cheers,
Steffen Schluff and Kristian K�hler